1
0
Fork 0
forked from gitea/nas

Remove double-query for signed query strings (#34610)

This commit is contained in:
Claire 2025-05-05 14:33:31 +02:00 committed by KMY
parent a7bc288569
commit f41c09f291
3 changed files with 4 additions and 19 deletions

View file

@ -6,14 +6,13 @@
class HttpSignatureDraft
REQUEST_TARGET = '(request-target)'
def initialize(keypair, key_id, full_path: true)
def initialize(keypair, key_id)
@keypair = keypair
@key_id = key_id
@full_path = full_path
end
def request_target(verb, url)
if url.query.nil? || !@full_path
if url.query.nil?
"#{verb} #{url.path}"
else
"#{verb} #{url.path}?#{url.query}"