kopia lustrzana https://github.com/nextcloud/social
validate host
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>pull/279/head
rodzic
90f18ea621
commit
89c8d9718b
|
@ -285,6 +285,7 @@ class SignatureService {
|
|||
* @param IRequest $request
|
||||
*
|
||||
* @return string
|
||||
* @throws SocialAppConfigException
|
||||
*/
|
||||
private function generateEstimatedSignature(string $headers, IRequest $request): string {
|
||||
$keys = explode(' ', $headers);
|
||||
|
@ -305,8 +306,11 @@ class SignatureService {
|
|||
$value = $request->getHeader($key);
|
||||
if ($key === 'host') {
|
||||
$value = $request->getInsecureServerHost();
|
||||
if ($this->configService->getCloudAddress(true) !== $value) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$estimated .= "\n" . $key . ': ' . $value;
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue