mirror of
https://github.com/YGGverse/Pulsar.git
synced 2026-03-31 17:55:37 +00:00
update request filter
This commit is contained in:
parent
f9b844bfbc
commit
5ccadde228
1 changed files with 5 additions and 7 deletions
|
|
@ -114,15 +114,13 @@ $server->setHandler(
|
||||||
// Filter path request
|
// Filter path request
|
||||||
$path = preg_replace(
|
$path = preg_replace(
|
||||||
[
|
[
|
||||||
'/[\.]+\//',
|
'/(^|\/)[\.]+/', // hidden items started with dot
|
||||||
'/[\/]+\//',
|
'/[\.]+\//', // relative directory paths
|
||||||
|
'/[\/]+\//', // remove extra slashes
|
||||||
],
|
],
|
||||||
'/',
|
'/',
|
||||||
ltrim(
|
trim(
|
||||||
trim(
|
$request->getPath()
|
||||||
$request->getPath()
|
|
||||||
),
|
|
||||||
'.'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue