Skip to content
Snippets Groups Projects
Commit 1109f979 authored by Amey Mudras's avatar Amey Mudras Committed by Sascha Grossenbacher
Browse files

Issue #3448498 by ameymudras, Anybody: Public method Redirect::generateHash()...

Issue #3448498 by ameymudras, Anybody: Public method Redirect::generateHash() should unify path before generating the hash
parent dc3d629e
No related branches found
No related tags found
1 merge request!98Updated generateHash() method to remove leading, trailing slashes and...
Pipeline #249808 passed with warnings
......@@ -60,6 +60,8 @@ class Redirect extends ContentEntityBase {
* Base 64 hash.
*/
public static function generateHash($source_path, array $source_query, $language) {
// Remove leading and trailing slashes, and convert to lowercase.
$source_path = trim(mb_strtolower($source_path), '/');
$hash = [
'source' => mb_strtolower($source_path),
'language' => $language,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment