cookies

I need to integrate two sites, what's the best way to carry over login information?

本小妞迷上赌 提交于 2020-01-06 03:59:47
问题 So, I have two sites, sites A and B. I need to make B part of A. I did this by adding a module to A, and within that module, an iframe that contained a link to B. So, effectively speaking, B can still be accessed as a standalone site, but it can also be accessed through A. Now, both sites require a login to allow access. I need to bypass the login for site B when it is accessed through Site A. I managed to bypass it, but only if the two sites are hosted on the same server (I used session

How do I set the `SameSite` attribute of HTTP cookies in python?

ぃ、小莉子 提交于 2020-01-06 03:50:08
问题 Support for Same-Site cookies has landed in Firefox 60, but as of Python 3.6 the standard library cookie module doesn't support the SameSite attribute. 回答1: Support for the SameSite attribute was added on April 7, 2018 in Pull Request #6413. It's possible to monkey-patch older versions to support the attribute: try: from http.cookies import Morsel except ImportError: from Cookie import Morsel Morsel._reserved[str('samesite')] = str('SameSite') Or using six: from six.moves.http_cookies import

C# .NET Cookie Handling For After Login

吃可爱长大的小学妹 提交于 2020-01-06 03:23:05
问题 I've spent some time researching this and still can't figure it out. It seem so simple so I feel like an idiot asking about it but after a while looking into it I just can't seem to get the hang of it. I need to programmatically log into this site: https://wholesale.frontiercoop.com/, store the cookie from the login, and resubmit it on the next login. It looks like it's a POST submit (which I gathered from using Firebug on Firefox) so I figured out how to store the cookie I think. I just can

using node.js request module to get a page with FileCookieStore

岁酱吖の 提交于 2020-01-06 03:06:54
问题 I'm trying to use node.js request to fetch a page from a webserver we use. I retrieve the cookies from the results of the previous request, and now trying send them to the profile page as request argument. var request = require('request'), fileCookieStore = require('tough-cookie-filestore'); var j = request.jar(new fileCookieStore("./cookie.json")); var options = { url : 'http://example.com/site/page.php?u=1234', jar : j, headers : { "User-Agent":"user_agent" } }; request(options, function

PHP Curl session cookie SSL login (error)

大城市里の小女人 提交于 2020-01-06 02:08:10
问题 PHP Curl session cookie SSL login (error) I had no trouble doing with other sites. I get error prossing request after login. login page requires user/pass and token (this was changed a lot different configurations to make it work but no luck) http was removed to XXXX be able to post $curl = curl_init(); curl_setopt($curl, CURLOPT_HEADER, 0); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 10; Windows NT 8.1)"); curl_setopt

PHP setcookie to resemble ASP.Net Cookie subkeys

不羁岁月 提交于 2020-01-06 01:58:09
问题 ASP.Net has the concept of using 'subkeys' in cookies. i.e. You can write a cookie with Response.Cookies("userInfo")("userName") = "patrick" Response.Cookies("userInfo")("lastVisit") = "today" This would create a cookie which looks like Name: userInfo Value: userName=patrick:lastVisit=today Is there a native method in PHP to read/write cookies like the above one? I need to read/write a cookie in PHP which can be read by ASP.Net with subkeys 回答1: To write such a cookie: $userInfo = array(

cookie is not unsetting

大兔子大兔子 提交于 2020-01-05 15:06:08
问题 In my login script, if a user select 'remember me' it sets cookie like this: setcookie("a", $valuea, time()+2595000, "/"); setcookie("b", $valueb, time()+2595000, "/"); and when a user (with 'remember me') select logout, the logout.php script unset cookie by the following way: if(isset($_COOKIE['a']) && isset($_COOKIE['b'])){ setcookie("a","", time()-2595000, "/"); setcookie("b","", time()-2595000, "/"); setcookie(session_id(),"",time()-2595000, "/"); } However, after logout the user is

how to exclude one subdomain from subdomains that share SESSION variable

半世苍凉 提交于 2020-01-05 15:05:07
问题 I had a cookie-free subdomain (static) until I used this code to make my session variable visible in all sub-domains: session_set_cookie_params(0,'/','.example.com'); apparently, By doing so, I have lost cookie-free characteristic of the "static" subdomain. How could I have one session variable visible in all subdomains except the static one? thank you for helping 回答1: I was having similar problem as you, and I think my solution will help you for your cookie-less static domain. I've described

Prevent Cross-Site Request Forgery

不羁的心 提交于 2020-01-05 13:11:43
问题 I understand Cross-Site Request Forgery and found numerous blogs,articles on web to handle it in asp.net mvc,but have not got a decent links,helpful solutions to deal with CSRF attacks in asp.net web applications.I have ran a security tool on my website,and its reporting the cross site request forgery and showing the risk It is possible to steal or manipulate customer session and cookies, which might be used to impersonate a legitimate user, allowing the hacker to view or alter user records,

jQuery Cookie Not Working in IE 8?

谁都会走 提交于 2020-01-05 12:13:11
问题 EDIT: I was having an issue with the cookie below so I switched to jQuery Cookie and still the error persist so I posted the jQuery Cookie code here but left my original question intact: On one page I call colorbox and that code works properly yet on another page I changed the cookie name and function called and it breaks, here is that code: var $j = jQuery.noConflict(); $j(window).load(function() { //I have also tried - $j(document).ready(function(){ - ///to see if that changed anything if(!