session

javascript with jsp

Ok its a continuation of my crap attempts of using client side scripts along with server side elements. <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; <html> <head> <meta http-eq...

Stopping Session Sharing between malicious users in Rails

What's the best way to keep users from sharing session cookies in Rails? I think I have a good way to do it, but I'd like to run it by the stack overflow crowd to see if there's a simpler way first. Basically I'd like to detect if someone tries to share a paid membership with others. Users are already screened at the point of login fo...

Can I create HttpContext.Current.Session programmatically if it is null?

My ASP.NET web application works fine in Internet Explorer, but in Firefox and Chrome I have a problem where HttpContext.Current is defined, but HttpContext.Current.Session is null. The error is probably caused by the fact that the Session object is being accessed to early in the ASP.NET page life cycle. But since the web site is primare...

Google bot .net and AspxAutoDetectCookieSupport dilemma

Hi, i have a .net mobile web site where i use sesion state and due to nature of mobile networks/phones (not all supports session cookies) i had to use <sessionState cookieless="AutoDetect"/> It works fine but because each new session redirected with "AspxAutoDetectCookieSupport=1" i have a feeling that google won't like this. Here ...

Stop Prototype.js Ajax.PeriodicalUpdater on user logout

Hi all, I have a list of "online users", which I refresh every 30 seconds with Ajax.PeriodicalUpdater from prototype.js. There is an issue, that if a user has two tabs/windows open with the site, logs out in one of them, the PeriodicalUpdater is not canceled. This means that PeriodicalUpdater updates my block element with the entire l...

How to close a browser on a selenium RC server which lost it's client

suppose a client starts a selenium session on an RC server, but at the middle of the session the client "went away". The browser will remain open, and eventually, after enough such dropped sessions, there will be enough "orphan" browsers to slow down the computer. How can I make sure those browsers are closed? Why isn't there a "keep-a...

How to unittest Session timeout in Django

I have a requirement something like this: As soon as the user signsup(and will be in the waiting state untill he confirms his email address), a session variable is set something like "FIRST_TIME_FREE_SESSION_EXPIRY_AGE_KEY"(sorry if the name sounds confusing!) which will be set to a datetime object adding 8hrs to the current time. Ho...

How to clear SQL session state for all users in ASP.NET

I use SQLServer SessionState mode to store session in my ASP.NET application. It stores certain objects that are serialized/deserialized every time they are used. If I make any changes in code of the structure of those objects and I put a new version live, any logged user will get an error, as their session objects (the old version one...

spring-security: authorization without authentication

hello, I'm trying to integrate Spring Security in my web application. It seems pretty easy to do as long as you integrate the whole process of authentication and authorization. However, both authentication and authorization seem so coupled that it's being very time-consuming for me to understand how I could split these processes, and...

Database-sessions in Spring

Hi guys, I'm quite new to Spring, and I would like to understand a bit more about sessions. I've mapped a legacy database with Hibernate annotated entities and built a couple of service objects to fetch, retrieve etc. My entities also contain other entities (mapped through foreign keys) and sets of entities. When I traverse the entitiy ...

session should never expire by itself

I m using login function in my site with session. This session of mine gets expired after few minutes irrespective of that user has logged out or not. Now what i want is that the session should only gets expired when a user logs out.If a user doesnt log out his account and then comes back after 2-3 days even then he should appear logged...

the best way to make codeigniter website multi-language. calling from lang arrays depends on lang session?

Hi friends, I'm researching hours and hours, but I could not find any clear, efficient way to make it :/ I have a codeigniter base website in English and I have to add a Polish language now. What is the best way to make my site in 2 language depending visitor selection? is there any way to create array files for each language and call...

Session seem to not work asp.net

I am not sure why this happens. In the same program i am using sessions which has worked. Now i am trying to make my site compatible when the user does not send cookies (which should be simple). I wrote long userId, loginId; //... //put data into cookies HttpContext.Current.Session.Add("userId", userId.ToString()); HttpContext.Current.S...

Security of $_SESSION array

When a low-privilege non-administrator user logs into my web app successfully, I am storing the following data in the $_SESSION array: $_SESSION = array( 'user_id' => 2343, // whatever their user_id number is from the DB 'allow_admin' => false, // don't give them access to admin tools 'allow_edit' => false, // don't le...

Call some JavaScript when the user closes a (popup) window

Is it possible to call some JS when the user closes a window? I searched for JS event handlers and found only onunload, which calls the script whenever the user leaves a page, not necessarily closing the window. The intended use is to call an AJAX script that unsets a few sessions pertinent to the popup window. There may or may not b...

Is there a way to extend a class ASP session whenever an ASP .NET Request is made?

I have a web site that runs both classic ASP and ASP.NET Webforms. The sessions for each are separate. I need to hit some asp page whenever a request is made on the ASP.NET pages. Why? Because I need to extend the ASP's session so it doesn't expire. I know this is going to cause a number of issues and I really really don't want to...

Determine if ASP.NET Sessions are enabled

What is the best way to do a boolean test in C# to determine if ASP.NET sessions are enabled? I don't want to use a try-catch block and Sessions != null throws an Exception. Regards. ...

Cross domain PHP Sessions

I am building a site which allows a user to point a CNAME record at my site to run their "profiles", this allows your OWN domain name to load your profile on my site. This is raising all sorts of issues related to sessions. I have seen virb do it. I don't see any of the information that is session based in an iFrame... but there IS an...

Rails session_id in URL

I am trying to pass a session_id in a URL with Rails (2.3.1). The passing of the id is working through default_url_options, I am using memcache as a session store and I've set :cookie_only to false in environment.rb However it still does not seem to work. If I log in successfully, the first page is shown correctly, however when I contin...

Problems with sessions and ColdFusion only in IE6

Hi there. We have a strange problem when implementing sessions with ColdFusion in IE6. After login and after a refresh on the page all the session variables are lost. Its some kind of config in the Administrator? Could you give me some troubleshooting tips to this issue? Thanks in advance! ...