File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -73,15 +73,16 @@ public function getExAppMetadata(string $appId): DataResponse {
7373 $ exApp = $ this ->exAppService ->getExApp ($ appId );
7474 if ($ exApp === null ) {
7575 $ this ->logger ->error ('ExApp not found ' , ['appId ' => $ appId ]);
76- // Protection for guessing installed ExApps list
77- $ this ->throttler ->registerAttempt (Application::APP_ID , $ this ->request ->getRemoteAddress (), [
78- 'appid ' => $ appId ,
79- ]);
8076 // return the same response as invalid harp key to prevent ex-app guessing
8177 return new DataResponse (['message ' => 'Harp shared key is not valid ' ], Http::STATUS_UNAUTHORIZED );
8278 }
8379
8480 if (!$ this ->validateHarpSharedKey ($ exApp )) {
81+ // Protection for guessing HaRP shared key
82+ $ this ->throttler ->registerAttempt (Application::APP_ID , $ this ->request ->getRemoteAddress (), [
83+ 'appid ' => $ appId ,
84+ ]);
85+ $ this ->logger ->error ('Harp shared key is not valid ' , ['appId ' => $ appId ]);
8586 return new DataResponse (['message ' => 'Harp shared key is not valid ' ], Http::STATUS_UNAUTHORIZED );
8687 }
8788
You can’t perform that action at this time.
0 commit comments