fix: harden url mapping validation
This commit is contained in:
1 parent
8d7abc8536
commit
4880613b67
4 files changed
+95
-6
No files matched your search
@@ -19,6 +19,13 @@ final class UrlMappingCollection {
|
||||
}
|
||||
|
||||
$this->mappings = array_values( $mappings );
|
||||
|
||||
usort(
|
||||
$this->mappings,
|
||||
static function ( UrlMapping $left, UrlMapping $right ): int {
|
||||
return strlen( $right->sourceUrl() ) <=> strlen( $left->sourceUrl() );
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user