Skip to content

Authentication_SignedURL::URLWithoutSignature() bothered by referer arg #4

@olberger

Description

@olberger

I think the extraction of the url that has been signed in Authentication_SignedURL::URLWithoutSignature() is not correct.

If there's a trailing arg after the sig arg in the URL, like referer, it will not return the correct substring.

I think the following is better :
{
$sig = $this->getQueryParameter('sig');
$startofsig=strpos($this->parsedURL, '&sig='.urlencode(isset($sig) ? $sig : NULL));
return substr($this->parsedURL, 0, $startofsig);
}

Hope this helps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions