Re: security problem in the /fetch/docsauth.php

From: Date: Sun, 13 Jun 2004 10:08:17 +0000
Subject: Re: security problem in the /fetch/docsauth.php
References: 1  Groups: php.doc.web 
Request: Send a blank email to doc-web+get-76@lists.php.net to get a copy of this message
On Sun Jun 13 08:35:23 2004 Nuno Lopes wrote: > Hi, > > There is a security problem in the new script to authenticate users in our > site. > The problem is that register_globals is on in the master server, so I could > hack the script and login myself :) > > Just do something like: > > http://master.php.net/fetch/docsauth.php?_SERVER[REMOTE_ADDR]=**server_ip**&token=**token**&credential=a_magic_cookie > > And you can use the script. > > And the token shouldn't be a md5/sha hash?... I've fixed the missing md5() around $_GET['token']). Also I've tested doing something like http://server.name/phpinfo.php?_SERVER[REMOTE_ADDR]=127.0.0.1&toekn=testing&credentials=testing to see if $_SERVER['REMOTE_ADDR'] changes when register globals is turned on and it does not change, which is correct. Regards --jm > > Nuno

« previous php.doc.web (#76) next »