Skip to content

Commit 5fb81ad

Browse files
committed
remove redundant .strip
1 parent 063a60d commit 5fb81ad

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/hooks/plugins/auth/shared_secret.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,8 @@ def self.valid?(payload:, headers:, config:)
8181
return false
8282
end
8383

84-
stripped_secret = raw_secret.strip
85-
8684
# Use secure comparison to prevent timing attacks
87-
result = Rack::Utils.secure_compare(secret, stripped_secret)
85+
result = Rack::Utils.secure_compare(secret, raw_secret)
8886
if result
8987
log.debug("Auth::SharedSecret validation successful for header '#{secret_header}'")
9088
else

0 commit comments

Comments
 (0)