Skip to content

Commit f5c664c

Browse files
authored
fix: proper strict arguments for cdn samples (GoogleCloudPlatform#1116)
1 parent 5cedd38 commit f5c664c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cdn/signUrl.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
function base64url_decode($input)
2727
{
2828
$input .= str_repeat('=', (4 - strlen($input) % 4) % 4);
29-
return base64_decode(strtr($input, '-_', '+/'));
29+
return base64_decode(strtr($input, '-_', '+/'), true);
3030
}
3131

3232
/**
@@ -66,7 +66,7 @@ function base64url_encode($input, $padding = true)
6666
function sign_url($url, $keyName, $base64UrlKey, $expirationTime)
6767
{
6868
// Decode the key
69-
$decodedKey = base64url_decode($base64UrlKey, true);
69+
$decodedKey = base64url_decode($base64UrlKey);
7070

7171
// Determine which separator makes sense given a URL
7272
$separator = (strpos($url, '?') === false) ? '?' : '&';

0 commit comments

Comments
 (0)