Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > de.comp.lang.php > #4252

Re: Sicherheitsrisiko $PHP_SELF

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups de.comp.lang.php
Subject Re: Sicherheitsrisiko $PHP_SELF
Date 2017-09-08 12:58 +0200
Organization PointedEars Software (PES)
Message-ID <4514480.OnKtubTn5d@PointedEars.de> (permalink)
References (1 earlier) <oo8pjm$fti$1@solani.org> <oo9a7r$fk0$1@dont-email.me> <oo9cfs$sqd$1@solani.org> <2037004.MrV9MI1u15@PointedEars.de> <ootsok$i6v$1@solani.org>

Show all headers | View raw


Christoph M. Becker wrote:

> Am 08.09.2017 um 11:53 schrieb Thomas 'PointedEars' Lahn:
>> $PHP_SELF bzw. $_SERVER['PHP_SELF'] zu verwenden, ist ausserdem ein
>> *Sicherheitsrisiko*, denn es handelt sich um eine *Variable, deren Wert
>> der Benutzer beeinflussen kann*:
>> 
>> <http://www.webadminblog.com/index.php/2010/02/23/a-xss-vulnerability-in-almost-every-php-form-ive-ever-written/>
> 
> Na ja, die Verwendung von PHP_SELF ist zunächst kein Sicherheitsrisiko;
> nur wenn der Wert unbereinigt als HTML ausgegeben wird, entsteht
> natürlich eine XSS-Sicherheitslücke.

Das kommt darauf an, was man unter „Bereinigen“ versteht:

| First, you could use the HTML entities or HTML special character functions 
| to sanitize the user input like this:
| 
| htmlentities($_SERVER['PHP_SELF]);
| 
| htmlspecialchars($_SERVER['PHP_SELF]);
| 
| This fix would still allow the user to manipulate the URL, and thus, what 
| is displayed on the page […]

(ibid.)

-- 
PointedEars
Zend Certified PHP Engineer <http://www.zend.com/en/yellow-pages/ZEND024953>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

Back to de.comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Eltern-Datei bei include Ralph Stahl <post@rstahl.de> - 2017-08-31 11:38 +0200
  Re: Eltern-Datei bei include "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-08-31 12:49 +0200
    Re: Eltern-Datei bei include Ralph Stahl <post@rstahl.de> - 2017-08-31 17:37 +0200
      Re: Eltern-Datei bei include "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-08-31 18:11 +0200
        Sicherheitsrisiko $PHP_SELF (was: Eltern-Datei bei include) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-09-08 11:53 +0200
          Re: Sicherheitsrisiko $PHP_SELF "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-09-08 12:52 +0200
            Re: Sicherheitsrisiko $PHP_SELF Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-09-08 12:58 +0200
      Re: Eltern-Datei bei include Stefan+Usenet@Froehlich.Priv.at (Stefan Froehlich) - 2017-08-31 16:45 +0000
        Re: Eltern-Datei bei include Ralph Stahl <post@rstahl.de> - 2017-09-02 09:13 +0200

csiph-web