From 85c625bbcc50b111b146d54bbc2963f07a468e17 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Rapha=C3=ABl=20Gertz?= <git@rapsys.eu>
Date: Sun, 8 Dec 2024 04:08:55 +0100
Subject: [PATCH] Cleanup trailing extra equals from hash method result

---
 Util/SluggerUtil.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Util/SluggerUtil.php b/Util/SluggerUtil.php
index 7abf5d3..0ff32c5 100644
--- a/Util/SluggerUtil.php
+++ b/Util/SluggerUtil.php
@@ -116,7 +116,7 @@ class SluggerUtil {
 		//Return hashed data
 		//XXX: we use hash_hmac with md5 hash
 		//XXX: crypt was dropped because it provided identical signature for string starting with same pattern
-		return str_replace(['+','/'], ['-','_'], base64_encode(hash_hmac('md5', $data, $this->secret, true)));
+		return str_replace(['+','/','='], ['-','_',''], base64_encode(hash_hmac('md5', $data, $this->secret, true)));
 	}
 
 	/**
-- 
2.41.3