Reply to Re: $HTTP_REFERER crashes my system like clockwork

Your name:

Reply:


Posted by Chung Leong on 10/15/65 11:53

Alvaro G. Vicario wrote:
> *** walterbyrd escribió/wrote (20 Jul 2006 11:49:52 -0700):
> > #if either form field is empty return to the log-in page
> > if ( (!$username) or (!$password) )
> > {
> > header("Location:$HTTP_REFERER");
> > exit();
> > }
>
> Do you check that $HTTP_REFERER actually has a value? Even if you have
> register_globals set to on, you must be aware that browsers can send
> HTTP_REFERER... or not.
>
> If the variable is empty, it's not a good idea to send an empty location
> header.

In that case I believe the browser would make a new request to the
current script, which of course, sends the redirect again. The
recursion would continue until the browser decides enough is enough and
kills the operation. That seems to match the symptoms described.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация