[Pmwiki-users] Easily Hackable?

Patrick R. Michaud pmichaud
Tue Apr 13 08:15:32 CDT 2004


On Mon, Apr 12, 2004 at 02:37:19PM -0700, H. Fox wrote:
> >You can also do
> >  if (!@$_SERVER['HTTPS']) Redirect($pagename);
> >which takes advantage of PmWiki's Redirect-to-page function, and provides
> >redirects-via-HTML for servers that don't properly process the Location:
> >header.
> 
> That works, too.  Maybe this is the best option then, unless there's a 
> drawback to using redirects-via-HTML.  IIRC HTML redirects can be 
> disabled in some browser.  Would some page contents come through if so? 

PmWiki's Redirect function sends both the Location: header and the HTML
<meta ...> tag.  The HTML meta tag is just a backup in case the web server
doesn't properly convert the Location: header into a HTTP 302 redirect.

>  I tried
> if (!@$_SERVER['HTTPS']) { Redirect($pagename); exit(); }
> and it works, but maybe the exit(); is redundant.

PmWiki's Redirect function includes the call to exit(), but redundancy
certainly doesn't hurt.  :-)

Pm



More information about the pmwiki-users mailing list