1
0
Fork 0

Stripe access tokens in a more generic way

pull/8279/head
Jordi Boggiano 2019-08-29 12:22:38 +02:00 committed by GitHub
parent f9fccbab1e
commit fd70d9cdc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -1128,10 +1128,6 @@ class RemoteFilesystem
{
// GitHub repository rename result in redirect locations containing the access_token as GET parameter
// e.g. https://api.github.com/repositories/9999999999?access_token=github_token
if (preg_match('{^(https?://([a-z0-9-]+\.)*github\.com/.*)\?access_token=[a-z0-9]+}', $url, $matches)) {
return $matches[1];
}
return $url;
return preg_replace('{([&?]access_token=)[^&]+}', '$1***', $url);
}
}