session-cookies

Is it safe to store User ID within the Flask session?

爷,独闯天下 提交于 2020-01-03 05:06:09
问题 I have found a number of articles online explaining that the Flask session is secured and not encrypted . This means that users can Base64 decode the cookie and read the values inside. Is it an issue if my application uses the User ID value from this session cookie to authenticate the user after he successfully logs in? If I understand correctly, the user will not be able to change his cookie value to an ID of another user, as it signed by the application private key on the server side. Is

Facebook Session Transfer js-SDK to php-SDK

北慕城南 提交于 2020-01-03 04:59:19
问题 I am using PHP SDK 2.1.2 and using the standard http://connect.facebook.net/en_US/all.js as the JS SDK. This is what i want to achieve: 1) Initialize JS Sdk, Call Fb.UI with (email,user_location,user_birthday), method: 'oauth', in response, if the user successfully gives permission do an ajax call to the server and then use PHP-SDK to do a call to Graph API and get the required data. (Well, you might argue to do a call to graph API via JS SDK but the current scenario requires me to use PHP

Making JSESSIONID cookie be httpOnly in Jetty 7

本秂侑毒 提交于 2020-01-02 10:26:06
问题 We're running grails 2.0 + jetty 7.6.6 and need to set JSESSIONID cookie to be httpOnly. All of the answers on stackoverflow seem to refer to either Servlet 3.0 (which requires jetty 8) or to tomcat. Can anyone provide me with a clear way of setting the JSESSIONID cookie be httpOnly for jetty 7.x? I have tried adding jetty-web.xml file with the following contents, but it still didn't work (i.e. the JSESSIONID wasn't marked as httpOnly): <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE

Accessing cookie expiration time owin

夙愿已清 提交于 2020-01-02 07:11:22
问题 I am trying to access expiration time on Owin i am using the following example Access ExpireTimeSpan property of Owin Cookie Authentication to notify user of login expiry but i cant get to work. I get an error the key, value does exist. I would really appreciate if someone could point me to the right direction thanks. StartupAuth.cs var config1 = new CookieAuthenticationOptions { AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie, //LoginPath = new PathString("/Account/Login"),

How to set the expiration time for a cookie managed by Plack::Middleware::Session?

懵懂的女人 提交于 2020-01-02 02:41:26
问题 Now my app.psgi contains (simplified): builder { enable 'Session', store => 'File'; #default uses Plack::Session::State::Cookie $app; }; Later, in the $app I'm using: my $req = Plack::Request->new($env); my $session = $req->session(); #returns env->{'psgix.session'} $session->{user} = "name"; It works ok , e.g.: when the user logged in, I store his name in the server-side stored session-file, and the Plack::Middleware::Session sets an simple session-state-cookie, and when the user closing the

cURL cookie value [closed]

大城市里の小女人 提交于 2020-01-01 09:55:11
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 7 years ago . I'm trying to download music loop files from this site: looperman.com. I've registered as a user, and I'm trying to download the loops using cURL. When

Sails.js authorization for socket requests

浪子不回头ぞ 提交于 2020-01-01 09:15:13
问题 I'm trying to build a chat application based on sails.js. The url for messages from a specific chat looks like this: /api/chat/:id/messages When I request this url with XHR, it provides a session cookie and sails.js builds a session object. I can easily check user rights to read the messages from the specific chat. However, I need to request this url with socket.io so that the client can subscribe to all future changes of the messages collection. When I request this url with socket.io, no

Set “secure” flag on session cookie in RoR even over HTTP

那年仲夏 提交于 2020-01-01 08:54:14
问题 In a Rails app, the session cookie can be easily set to include the secure cookie attribute, when sending over HTTPS to ensure that the cookie is not leaked over a non-HTTP connection. However, if the Rails app is NOT using HTTPS, but HTTP only, it seems that it doesnt even set the cookie at all. While this does make some sense, in this scenario there is a seperate front end load balancer, which is responsible for terminating the SSL connection. From the LB to the Rails app, the connection is

Can't get Express session ID from cookies w/ Socket.IO

戏子无情 提交于 2020-01-01 08:01:30
问题 I have a typical web application in Node that is utilizing the Express framework and the session middleware. I am also using Socket.io for certain dynamic parts of my application (currently, this is a chat mechanism, but that's tangential). I've been able to successfully set up sessions and socket.io on their own, but would like to combine them (EG: to associate socket chat messages with user accounts without hitting the database). It should be noted (and I can see this being a possible issue

session not shared between two server

六眼飞鱼酱① 提交于 2020-01-01 06:26:11
问题 i have big trouble with my application that web-application(jsp,java,servlet) landed between two server cause there is load-sharing between server but unfortunately session not maintaining between server now i am checking checking after login if session is there than ok otherwise i am taking all credential from url (visible encoded url with same key if somebody remember url then big mess ) obviously its not secure at all ,SO how we can resolve this problame at application level please guide