Overview
Comment:Limiter les appels directs à _route.php
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 681b1f235f6452dd01388b01ba690d3737c4c596
User & Date: bohwaz on 2019-12-03 17:46:34
Other Links: manifest | tags
Context
2019-12-03
17:48
Amélioration de la gestion des configurations en sous-répertoire ou en alias (normalement) check-in: ca9198db3f user: bohwaz tags: trunk
17:46
Limiter les appels directs à _route.php check-in: 681b1f235f user: bohwaz tags: trunk
17:45
Amélioration fichiers .htaccess pour l'hébergement mutualisé check-in: 72097b2839 user: bohwaz tags: trunk
Changes

Modified src/www/_route.php from [0038367108] to [d068381921].

1
2
3
4




5




6
7
8
9
10
11
12
<?php

namespace Garradin;





$uri = $_SERVER['REQUEST_URI'];





if (($pos = strpos($uri, '?')) !== false)
{
	$uri = substr($uri, 0, $pos);
}

if (file_exists(__DIR__ . $uri))




>
>
>
>

>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

namespace Garradin;

if (empty($_SERVER['REQUEST_URI'])) {
	die('Appel non supporté');
}

$uri = $_SERVER['REQUEST_URI'];

if ('_route.php' === basename($uri)) {
	die('Appel interdit');
}

if (($pos = strpos($uri, '?')) !== false)
{
	$uri = substr($uri, 0, $pos);
}

if (file_exists(__DIR__ . $uri))