session-cookies

Setting HTTPONLY for Classic Asp Session Cookie

时光怂恿深爱的人放手 提交于 2019-11-27 01:03:50
问题 Does anyone know exactly how to set HTTPONLY on classic ASP session cookies? This is the final thing that's been flagged in a vulnerability scan and needs fixing ASAP, so any help is appreciated. ~~~A LITTLE MORE INFORMATION ON MY PROBLEM~~~ Can anyone please help me with this? I need to know how to set HTTPONLY on the ASPSESSION cookie created by default from ASP & IIS. This is the cookie automatically created by the server for all asp pages. If needed i can set HTTPONLY on all cookie across

How do I create persistent sessions in PHP?

瘦欲@ 提交于 2019-11-27 01:02:22
I used session_start() to initiate a session in PHP, but when my browser closes, the session is gone. How do I use PHP to create persistent sessions that last across browser closes? See the php.ini value session.cookie_lifetime . The default value of 0 means to end the session when the browser closes. You can override this value either directly in php.ini or set it in your application prior to starting the session using ini_set . Setting it to something greater than 0 will cause the session to live for that duration. E.g. ini_set('session.cookie_lifetime', 60 * 60 * 24 * 7); // 7 day cookie

Switching between HTTP and HTTPS pages with secure session-cookie

最后都变了- 提交于 2019-11-27 00:57:37
Update: Note that every website switching between unsecure HTTP and encrypted HTTPS pages, is inevitable prone to SSL-strip . Please think about using HTTPS for the whole site, although this neither can prevent SSL-strip, at least this gives the user the possibility to call the site safely, if he cares. For sites that need to switch, this method is probably still the best option. It's a common scenario, that a website has pages with sensitive data, which should be accessed only with the HTTPS protocoll, and other ones with noncritical data. I found a solution which allows switching between

Session/cookie management in Apache JMeter

痴心易碎 提交于 2019-11-27 00:50:52
问题 We have a simple performance test flow in an application. We login Search based on some criteria repeat searches for different parameters. We are using Jmeter to do a performance testing. We need to have multiple threads running to test this in a scalable manner. The way we currently have this arranged is: -Test Plan - Thread Group - Cookie Manager - Login To application - Search on param 1 - Search on param 2 - results summary table - Summary report So basically we have summary return table

Issue with Session and Cookie in Internet Explorer for websites containing underscore

三世轮回 提交于 2019-11-26 23:31:09
问题 Recently we have created few websites with underscore (contains under website name). --------> example (xyz_mnp.com) Issue is: Every time a page request cookie and session resets. It works fine with other browser but facing issue in IE I search lots of thread but didn't find any solution yet. Any help guys. Thanks 回答1: Internet Explorer rejects all cookies with an underscore in the domain, because underscores are not allowed in DNS hostnames. This is a well-known limitation in IE, documented

How to delete cookies on an ASP.NET website

谁说我不能喝 提交于 2019-11-26 22:51:47
问题 In my website when the user clicks on the "Logout" button, the Logout.aspx page loads with code Session.Clear() . In ASP.NET/C#, does this clear all cookies? Or is there any other code that needs to be added to remove all of the cookies of my website? 回答1: Try something like that: if (Request.Cookies["userId"] != null) { Response.Cookies["userId"].Expires = DateTime.Now.AddDays(-1); } But it also makes sense to use Session.Abandon(); besides in many scenarios. 回答2: No, Cookies can be cleaned

session_start() creates new session every refresh [duplicate]

故事扮演 提交于 2019-11-26 22:06:30
问题 This question already has answers here : How to fix “Headers already sent” error in PHP (11 answers) Closed 6 years ago . I am having an issue with session_start() . It is creating a new session every refresh/load of the page. here is the code: <?php $bob = session_id(); echo "Session ID on load is ".$bob; echo "<br>"; if($bob==""){ session_start(); $bob = session_id(); echo ' session ID currently is '.$bob; } // a bunch more stuff when i load the page, I get the following: Session ID on load

What is the difference between Sessions and Cookies in PHP?

混江龙づ霸主 提交于 2019-11-26 21:57:49
What is the distinction between Sessions and Cookies in PHP? A cookie is a bit of data stored by the browser and sent to the server with every request. A session is a collection of data stored on the server and associated with a given user (usually via a cookie containing an id code) Cookies are used to identify sessions. Visit any site that is using cookies and pull up either Chrome inspect element and then network or FireBug if using Firefox. You can see that there is a header sent to a server and also received called Cookie. Usually it contains some personal information (like an ID) that

JAX-WS client: maintain session/cookies across multiple services

时光毁灭记忆、已成空白 提交于 2019-11-26 20:27:22
问题 I'm using Netbeans to automatically create webservice clients based off WSDL files. This works well, except the webservices I'm using require that I pass in a custom cookie in the HTTP header to every webservice in order to prove my identity. I use one webservice named Utility to get my authorization. This sets a cookie which needs to be provided in all subsequent calls to any webservice. This can be accomplished by setting javax.xml.ws.session.maintain to true on the BindingProvider of the

Express 4 Sessions not persisting when restarting server

末鹿安然 提交于 2019-11-26 20:23:40
问题 I have an Express 4 app setup to have sessions. // Sessions app.use(cookieParser()); app.use(session({ secret: "some-secret" })); // Signup app.post("/signup", function (req, res) { create_user(req.body.user, function (err, user_id) { req.session.user_id = user_id; res.redirect("/admin"); }); }); When I submit the form, it saves the user_id to the req.session. However, when I restart the server, the session is gone. Why isn't it persisting? Am I missing some configuration? 回答1: The default