@@ -98,7 +98,7 @@ public function getSharedSecretLegacy(string $url, string $token): DataResponse
9898 public function requestSharedSecret (string $ url , string $ token ): DataResponse {
9999 if ($ this ->trustedServers ->isTrustedServer ($ url ) === false ) {
100100 $ this ->throttler ->registerAttempt ('federationSharedSecret ' , $ this ->request ->getRemoteAddress ());
101- $ this ->logger ->error ('remote server not trusted ( ' . $ url . ') while requesting shared secret ' , [ ' app ' => ' federation ' ] );
101+ $ this ->logger ->error ('remote server not trusted ( ' . $ url . ') while requesting shared secret ' );
102102 throw new OCSForbiddenException ();
103103 }
104104
@@ -107,8 +107,7 @@ public function requestSharedSecret(string $url, string $token): DataResponse {
107107 $ localToken = $ this ->dbHandler ->getToken ($ url );
108108 if (strcmp ($ localToken , $ token ) > 0 ) {
109109 $ this ->logger ->info (
110- 'remote server ( ' . $ url . ') presented lower token. We will initiate the exchange of the shared secret. ' ,
111- ['app ' => 'federation ' ]
110+ 'remote server ( ' . $ url . ') presented lower token. We will initiate the exchange of the shared secret. '
112111 );
113112 throw new OCSForbiddenException ();
114113 }
@@ -141,16 +140,15 @@ public function requestSharedSecret(string $url, string $token): DataResponse {
141140 public function getSharedSecret (string $ url , string $ token ): DataResponse {
142141 if ($ this ->trustedServers ->isTrustedServer ($ url ) === false ) {
143142 $ this ->throttler ->registerAttempt ('federationSharedSecret ' , $ this ->request ->getRemoteAddress ());
144- $ this ->logger ->error ('remote server not trusted ( ' . $ url . ') while getting shared secret ' , [ ' app ' => ' federation ' ] );
143+ $ this ->logger ->error ('remote server not trusted ( ' . $ url . ') while getting shared secret ' );
145144 throw new OCSForbiddenException ();
146145 }
147146
148147 if ($ this ->isValidToken ($ url , $ token ) === false ) {
149148 $ this ->throttler ->registerAttempt ('federationSharedSecret ' , $ this ->request ->getRemoteAddress ());
150149 $ expectedToken = $ this ->dbHandler ->getToken ($ url );
151150 $ this ->logger ->error (
152- 'remote server ( ' . $ url . ') didn \'t send a valid token (got " ' . $ token . '" but expected " ' . $ expectedToken . '") while getting shared secret ' ,
153- ['app ' => 'federation ' ]
151+ 'remote server ( ' . $ url . ') didn \'t send a valid token (got " ' . $ token . '" but expected " ' . $ expectedToken . '") while getting shared secret '
154152 );
155153 throw new OCSForbiddenException ();
156154 }
0 commit comments