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
|
||||
$path = preg_replace(
|
||||
[
|
||||
'/[\.]+\//',
|
||||
'/[\/]+\//',
|
||||
'/(^|\/)[\.]+/', // hidden items started with dot
|
||||
'/[\.]+\//', // relative directory paths
|
||||
'/[\/]+\//', // remove extra slashes
|
||||
],
|
||||
'/',
|
||||
ltrim(
|
||||
trim(
|
||||
$request->getPath()
|
||||
),
|
||||
'.'
|
||||
trim(
|
||||
$request->getPath()
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue