fix: harden url mapping validation

This commit is contained in:
Keith Solomon
2026-04-26 14:34:44 -05:00
parent 8d7abc8536
commit 4880613b67
4 changed files with 95 additions and 6 deletions
+7
View File
@@ -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() );
}
);
}
/**