🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.php
Article #230777

Re: bezpieczeństwo instrukcji require

#230777
From: Borys Pogoreło
Date: Wed, 10 Dec 2014 19:53
16 lines
1332 bytes
Dnia Mon, 8 Dec 2014 02:36:06 -0800 (PST), jivanmukta@poczta.onet.pl
napisał(a):

> Czy takie rozwiązanie jest bezpieczne? Chodzi mi w szczególności o instrukcję:
>   require "../application/config/{$server}_constants.php";

W tej sytuacji teoretycznie bezpieczne, ale tak przekombinowane, że jestem
pełen podziwu dla kreatywności.

hint: SetEnv ENV_TYPE testing

I w czym ma pomóc wykonanie addslashes() na ścieżce do pliku?

-- 
Borys Pogoreło
borys(#)leszno,edu,pl
Technical Details
Message-ID: <5zy6vwrv94r8$.1o8tkwaykznph.dlg@40tude.net>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!news.promontel.net.pl!not-for-mail
References: <244f5de3-856c-4023-80db-149459ffffb7@googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!news.promontel.net.pl!not-for-mail
From: Borys Pogoreło <borys@pl.edu.leszno>
Newsgroups: pl.comp.lang.php
Subject: Re: bezpieczeństwo instrukcji require
Date: Wed, 10 Dec 2014 20:53:39 +0100
Organization: snafu
Lines: 16
Message-ID: <5zy6vwrv94r8$.1o8tkwaykznph.dlg@40tude.net>
References: <244f5de3-856c-4023-80db-149459ffffb7@googlegroups.com>
NNTP-Posting-Host: eki217.neoplus.adsl.tpnet.pl
Mime-Version: 1.0
X-Trace: thunar.promontel.net.pl 1418241200 17047 83.21.176.217 (10 Dec 2014 19:53:20 GMT)
X-Complaints-To: abuse@promontel.net.pl
NNTP-Posting-Date: Wed, 10 Dec 2014 19:53:20 +0000 (UTC)
User-Agent: 40tude_Dialog/2.0.14.1pl
X-fnord: obey.
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit