SharedObject (Flex 3.2) behaving unexpectedly when query string present in URL
Posted
by rhtx
on Stack Overflow
See other posts from Stack Overflow
or by rhtx
Published on 2009-02-19T19:01:22Z
Indexed on
2010/03/18
9:01 UTC
Read the original article
Hit count: 335
Summary: The behavior detailed below seems to indicate that if your app at www.someplace.com sets/retrieves data via a SharedObject, there is some sort of .sol collision if the user hits your app at someplace.com, and then later at someplace.com?name=value.
Can anyone confirm or refute this?
I'm working on a Flex web app that presents the user with a login page. When the user has logged in, he/she is presented with a 'room' which is associated with a 'group'.
We store the last-visited room/group combination in a SharedObject - so when a given user logs in, they are taken into the most recent room in which they were active.
That works fine, but we also have an auto-login system which involves the user clicking on a link to the app url with a query string attached. There are two types of these links.
1) the query string includes username, groupId, and roomId
2) the query string includes only the username
Because we are working fast and have only a few developers, the auto-login system is built on the last-vist system. During the auto-login process, the url is inspected and if groupId and roomId values are found in the query string, the SharedObject is opened and the last-visit group/room id values are overwritten by the param values.
That works fine, also, when the app is hit with a query string of the second type (no groupId and roomId params), the app goes to the SharedObject to get the stored room and group id values, as it normally would. And here's the problem:
The values it comes back with are whatever the last room/group param values were, not whatever the last last-visit room/group values are.
And if the given user has never hit the app with query string that included group and room id values, the app gets null values from the SharedObject.
It took some digging around, but what it looks like is happening is that a second set of data is being stored/expected in the SharedObject if a query string is present in the URL.
Looking at the .sol file in a text editor I see more untranslated code, and additional group and room values, once I've hit the app with URLs that contain query strings.
I'm not finding anything on the web about this, but that may just be due to a lack of necessary search skills.
Has anyone else run into anything similar? Or do you know how to address this?
I've tried setting Security.exactSettings to false, already - was really hoping that was going to work.
© Stack Overflow or respective owner