cookies

iframe not reading cookies in Chrome

时间秒杀一切 提交于 2020-01-14 07:57:19
问题 Chrome is not allowing a child iframe to read its own cookies. I have a parent webpage with a child iframe: parent at https://first-site.com child at <iframe src="https://second-site.com"> (inside of parent) cookie set with path: '/' secure: true httpOnly: false domain: '.second-site.com' I control both sites, and I want the iframe to perform an operation within the iframe that requires reading cookies for .second-site.com . The outer parent doesn't need to know anything about this. It works

Nginx Does Not Pass Cookies To Proxy

自作多情 提交于 2020-01-14 07:46:06
问题 I have a cookie set will work for all subdomains, .example.com . I have nginx ajax calls go through a proxy_pass but the cookie does not remain. My configuration looks like this: server { listen 80; server_name www.example.com; location / { root /data/sites/www.example.com/widgets/public_html; index index.php index.html index.htm; try_files $uri $uri/ /index.php?rt=$uri&$args; } location ~ .php$ { root /data/sites/www.example.com/site/public_html; fastcgi_pass 127.0.0.1:9000; fastcgi_param

Getting or Manipulating all cookies in Selenium Webdriver

China☆狼群 提交于 2020-01-14 07:23:59
问题 Trying to mess with cookies using Chromedriver with Python (or Java). I've figured out that for cookie in browser.get_cookies(): print(cookie['name'] + ' --> ' + cookie['value']) only gives me the cookies relevant to the active page my browser's on. Is there any method I can, using either Selenium or native Python (on Ubuntu, if I need to go into the file system), get all of the cookies on my active selenium session? 回答1: You can provide a userdir and extract the cookies from there. co =

Getting or Manipulating all cookies in Selenium Webdriver

寵の児 提交于 2020-01-14 07:22:23
问题 Trying to mess with cookies using Chromedriver with Python (or Java). I've figured out that for cookie in browser.get_cookies(): print(cookie['name'] + ' --> ' + cookie['value']) only gives me the cookies relevant to the active page my browser's on. Is there any method I can, using either Selenium or native Python (on Ubuntu, if I need to go into the file system), get all of the cookies on my active selenium session? 回答1: You can provide a userdir and extract the cookies from there. co =

How to Maintain state Jersey Client Using java

无人久伴 提交于 2020-01-14 06:57:12
问题 How to Maintain state Jersey Client { // // Some session logic // } Client client = ClientBuilder.newClient(); WebTarget baseTarget = client.target("https"); / MultivaluedMap<String, String> formData = new MultivaluedHashMap<String, String>(); formData.add("usr", "@gmail.com"); formData.add("pwd", "mat"); Response response = baseTarget.request().post(Entity.form(formData)) System.out.println("----Second-time--method invoked GET-------"); Response resp_sec = base2Target.request().get(); /

Cross protocol cookie iFrame

百般思念 提交于 2020-01-14 06:16:39
问题 I have a web page on http ://localhost/mySite/Page1.aspx that contains an iframe with src https ://localhost/mySite/Page2.aspx. Inside iframe page (Page2.aspx), i set cookie with JavaScript. How i can read that cookie on parent page (Page1.aspx)??? It looks like Page1 not sees the cookie that Page2 sets. To set/read cookies, I use jQuery.Cookie plugin: $.cookie('myKey', JSON.stringify(data), { expires: 1, path: '/', domain: 'localhost' }); BTW, if someone can give me an idea how to transfer

PHP: Cookie in browser, but receive index undefined error

走远了吗. 提交于 2020-01-14 05:55:06
问题 I'm setting my cookie properly in my code, for example: $expire = time()+60*60*24*30; setcookie("userid", 27, $expire); But then when I attempt to access the cookie to use it's value ( $userid = $_COOKIE['userid']; ), I keep receiving, "undefined index: userid" If I check my browser's (in this case, Firefox) cookies I can clearly see that my cookie is there and set: Any and all assistance is appreciated...this is driving me insance. Thanks! 回答1: I see that cookie has 'path' attribute set to

PHP: Cookie in browser, but receive index undefined error

落爺英雄遲暮 提交于 2020-01-14 05:53:07
问题 I'm setting my cookie properly in my code, for example: $expire = time()+60*60*24*30; setcookie("userid", 27, $expire); But then when I attempt to access the cookie to use it's value ( $userid = $_COOKIE['userid']; ), I keep receiving, "undefined index: userid" If I check my browser's (in this case, Firefox) cookies I can clearly see that my cookie is there and set: Any and all assistance is appreciated...this is driving me insance. Thanks! 回答1: I see that cookie has 'path' attribute set to

Android webview( webkit.CookieManager) neglecting cookie attributes like ;expires

拈花ヽ惹草 提交于 2020-01-14 05:24:48
问题 Set-Cookie: oauth=xyz; domain=tyxbv; path=/; expires=Tue, 27-Oct-2020 17:16:00 GMT; secure; HttpOnly This is the cookie which i am getting from server when my webivew hits the url. But when I try to get the cookie details from the webview using getCookie("url which sets the cookie") i get oauth = xyz The other cookie attributes are not stored in the cookie store. I am unable to solve the above. I need other attributes also like path, expires. etc I am setting accept third party cookies true

WebBrowser Control Mishandling Cookies when Internet Explorer is Open

不羁岁月 提交于 2020-01-14 03:59:13
问题 I'm building an application in C# that makes use of the WebBrowser control. This is loading a specific page (that I did not create) that uses a popup and a cookie that determines what the last "ID" searched for was. This all works fine, except when Internet Explorer is open in the background. When Internet Explorer is open in the background, the popup only goes to the first ID ever set. It would appear that the cookies aren't being stored properly when IE is open. Breakdown: User opens