Skip to content

Commit 4e7f95c

Browse files
authored
Capitalize sameSite attribute in cookie creation
This handles situations where you get a direct injection from a valid set-header response in API requests
1 parent 8e46f06 commit 4e7f95c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rb/lib/selenium/webdriver/common/manager.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def add_cookie(opts = {})
5050
opts[:secure] ||= false
5151

5252
same_site = opts.delete(:same_site)
53-
opts[:sameSite] = same_site if same_site
53+
opts[:sameSite] = same_site.capitalize if same_site
5454

5555
http_only = opts.delete(:http_only)
5656
opts[:httpOnly] = http_only if http_only

0 commit comments

Comments
 (0)