PDA

View Full Version : Asp page coding issue


footiefan
10-14-2010, 09:15 PM
Evening everyone.
I have a script in one of my asp pages that sends to homepage a specific user.
This is the code:

<%if Request.Cookies("username")="xxxxx" then
Response.Write("<script>window.open('index.html','_top');</script>")
end if%>

This always worked fine, but something tells me that a user with a mobile phone was able to access this page, even if he shouldn't.

Do you think this coding could be not working with a mobile browser, and if so, how I could rewrite (or add a new part) to include mobiles too?
Thanks to all willing to help.

Old Pedant
10-15-2010, 01:49 AM
Don't know about mobile browser,does the mobile browser support java scripts http://www.sscqw.com/img/916/smile.png
Some do, many do not.

I think it is more likely somebody with a mobile browser simply went directly to the "index.html" page.

footiefan
10-15-2010, 09:59 AM
thanks for replies.
Sorry, maybe I didn't explain very well.
The page where this script is in, is a kind of message board, and we used to exclude banned users from it by adding their username to that script.
Everytime they try to access the page they are sent to the main page.
Hence they should be able to reach the main page, actually they have to. Where they should not come is in the board page. But for the first time a user was able to access and post a message even if his username was in the code.
We guess it's a mobile phone issue, because we tried with all computers and could never reach that page...

Old Pedant
10-15-2010, 07:12 PM
Well, shoot, all a user has to do even on a regular computer is turn off cookies and your code is trash.