View previous topic :: View next topic |
Author |
Message |
acecombat -
Joined: 29 Sep 2005 Posts: 31
|
Posted: Thu Sep 29, 2005 8:41 am Post subject: Password problems |
|
|
Hi.
I have a site set up, at \\ level is a fairly plain page that when you click on the link is navigated to \\secure\ which is set up with password access with abyss x1. I also set up custom error pages for 400, 401, 403 and 404 and they are saved in \\. When you click the sign in link and either enter wrong 3 times or hit cancel, it goes to the correct error page and the text is displayed but it asks for the password again, and unless you enter it the image wont display on the page (image is also stored in \\)
Any ideas on why this has happened?!? |
|
Back to top |
|
 |
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Thu Sep 29, 2005 10:28 am Post subject: |
|
|
Not quite sure how this is set up, but at a rough guess, i'd say that the image thats on your 403 page is in the protected folder.
If you made an error page in say /error_me.html and it used image the_finger.jpg coded as <IMG src='the_finger.jpg'> then because the error page effectivley becomes whatever page the error is at, then an error called on /obviously/doesn't/exist wouldn't find the image in /obviously/doesn't/exist, however /obviously/doesn't/exist is protected so it gives a password prompt first. You'd have to put <IMG src='/the_finger.jpg'>.
If you haven't done the last one, don't mind me, I just thought that might be the case cause you're using the wrong slashes. _________________
 |
|
Back to top |
 |
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Sep 29, 2005 12:37 pm Post subject: Re: Password problems |
|
|
acecombat wrote: | Hi.
I have a site set up, at \\ level is a fairly plain page that when you click on the link is navigated to \\secure\ which is set up with password access with abyss x1. I also set up custom error pages for 400, 401, 403 and 404 and they are saved in \\. When you click the sign in link and either enter wrong 3 times or hit cancel, it goes to the correct error page and the text is displayed but it asks for the password again, and unless you enter it the image wont display on the page (image is also stored in \\)
Any ideas on why this has happened?!? |
What are the access rules? (in other words what are your password protected directories? Apparently you're protecting by a password the error pages and images which gives you this strange behavior.) _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
acecombat -
Joined: 29 Sep 2005 Posts: 31
|
Posted: Thu Sep 29, 2005 1:14 pm Post subject: |
|
|
So this is my dirs:
/
/protected
The main index.html file is in / which links to an index file in /protected
The error pages AND the images are both in /
So you have:
/index.html
/400.html
/400.gif
/401.html
/401.gif
/403.html
/403.gif
/404.html
/404.gif
/protected/index.html
And the only directory that is set as protected is, /protected and the main /index.html file loads fine! |
|
Back to top |
|
 |
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Thu Sep 29, 2005 1:27 pm Post subject: |
|
|
acecombat wrote: | So this is my dirs:
/
/protected
The main index.html file is in / which links to an index file in /protected
The error pages AND the images are both in /
So you have:
/index.html
/400.html
/400.gif
/401.html
/401.gif
/403.html
/403.gif
/404.html
/404.gif
/protected/index.html
And the only directory that is set as protected is, /protected and the main /index.html file loads fine! |
Whats the source of 403.html? _________________
 |
|
Back to top |
 |
 |
acecombat -
Joined: 29 Sep 2005 Posts: 31
|
Posted: Thu Sep 29, 2005 1:31 pm Post subject: |
|
|
The webdrive root, along with the index.html file that works, hence the /403.html
What puzzles me though is that its loading the 403.html file but wont load the .gif which is in exactly the same, non-passworded dir |
|
Back to top |
|
 |
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Thu Sep 29, 2005 2:15 pm Post subject: |
|
|
acecombat wrote: | The webdrive root, along with the index.html file that works, hence the /403.html
What puzzles me though is that its loading the 403.html file but wont load the .gif which is in exactly the same, non-passworded dir |
What I'm implying is that you've put something like 403.jpg in, when you should set it to /403.jpg or something.
Cause when you trigger a 403, 403.html will effectivley become whatever you triggered it on. E.G. If I accessed /protected/pr0n.jpg, pr0n.jpg would have the source of 403.html, so if the path is reletive it would look for /protected/403.jpg, which even though it may not exist, will trigger a 403. _________________
 |
|
Back to top |
 |
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Fri Sep 30, 2005 1:41 pm Post subject: |
|
|
acecombat wrote: | The webdrive root, along with the index.html file that works, hence the /403.html
What puzzles me though is that its loading the 403.html file but wont load the .gif which is in exactly the same, non-passworded dir |
The best is to see your log file to understand what are the files that are actually requested by the browser (and which ones resulted in a password prompt - status 401). _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
acecombat -
Joined: 29 Sep 2005 Posts: 31
|
Posted: Fri Sep 30, 2005 2:21 pm Post subject: |
|
|
Its really weird. This is the line from the log
Quote: | 60.240.186.12 - - [30/Sep/2005:23:14:12 +1000] "GET /secure/401.gif HTTP/1.1" 401 416 |
But there is nothing saved or linked to that dir.
Here is the page data
Quote: | <head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Mobile Connect - Mobile Portal</title>
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<p><img border="0" src="401.gif" width="190" height="171"><b><br>
Error 401 - Unauthorised<br>
</b><font size="2">Re-enter your credentials.</font></p>
</body>
</html>
|
As you can see it doesn't reference anything outside of the directory it's in and the text loads fine. I'm presuming this is a problem with Abyss maybe not returning the correct path??? Just for my own curiosity I decided I'd move the error pages to a folder called "errors" which is also unprotected and it does exactly the same thing. |
|
Back to top |
|
 |
roganty -
Joined: 08 Jun 2004 Posts: 357 Location: Bristol, UK
|
Posted: Fri Sep 30, 2005 11:02 pm Post subject: |
|
|
ok, lets explain whats going on here.
lets assume that the error pages are in folder /error
when you view the error page normally, for example browse to the page location, /error/404.html
it looks for the image in the /error directory, and finds it.
when the page is viewed as a 'proper' error page then the page location becomes /path/to/error/404.html
now the image is looked for in the /path/to/error directory
so that means that you need to reference the image with absolute paths.
for example
<img src="404.gif" /> is a relative path and is wrong.
<img src="/error/404.gif" /> is an absolute path and would find the image in the correct directory _________________ Anthony R
Roganty | Links-Links.co.uk |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sat Oct 01, 2005 9:42 am Post subject: |
|
|
As explained roganty, any file referenced in your error pages (image, .JS, or .CSS) must be linked using its absolute virtual path since you don't know at which directory the error can occur and you cannot rely on the browser resolving the relative virtual paths in such a context. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
acecombat -
Joined: 29 Sep 2005 Posts: 31
|
Posted: Sat Oct 01, 2005 1:41 pm Post subject: |
|
|
Sorry, I think I'm not making sence here. They WERE in the errors directory but now they are in root dir as I thought it might have been a problem accessing the different directorys after asking for a password. The absolute path to the file is \404.gif as both the html file and gif are in the root directory but it still refuses to load. |
|
Back to top |
|
 |
acecombat -
Joined: 29 Sep 2005 Posts: 31
|
Posted: Sun Oct 02, 2005 6:12 am Post subject: |
|
|
OK, I checked my logs and it appears that after a failed password attempt at logging into /secure/index.htm it loads the /401.htm file ok but tries and loads the pic from /secure/401.gif. I opened the 401.htm in notepad and frontpage had the picture location as "401.gif" so i just popped a / infront of it and it works ok!!! Is this a bug in Abyss 'cause most other web pages I've seen before just reference the file as "name.gif" rather than "/name.gif"? |
|
Back to top |
|
 |
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Sun Oct 02, 2005 6:26 am Post subject: |
|
|
acecombat wrote: | OK, I checked my logs and it appears that after a failed password attempt at logging into /secure/index.htm it loads the /401.htm file ok but tries and loads the pic from /secure/401.gif. I opened the 401.htm in notepad and frontpage had the picture location as "401.gif" so i just popped a / infront of it and it works ok!!! Is this a bug in Abyss 'cause most other web pages I've seen before just reference the file as "name.gif" rather than "/name.gif"? |
With all due respect, thats what everyone who's replied to this thread has been trying to say. And no, it isn't a bug, its how HTTP & HTML work. _________________
 |
|
Back to top |
 |
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sun Oct 02, 2005 4:23 pm Post subject: |
|
|
acecombat wrote: | Is this a bug in Abyss 'cause most other web pages I've seen before just reference the file as "name.gif" rather than "/name.gif"? |
This isn't a bug. It is the difference between relative and absolute paths when they are processed by a browser. Everything is explained in details in Abyss Web Server user guide (see the "How do web servers work" chapter). _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
|