diff --git a/app/modules/bma/lib/controllers/wot.ts b/app/modules/bma/lib/controllers/wot.ts
index d408c3a6194e8360a6099249d517a41f8c153222..99dda6b48c8db398f935d94660a0c3980e14b734 100644
--- a/app/modules/bma/lib/controllers/wot.ts
+++ b/app/modules/bma/lib/controllers/wot.ts
@@ -189,6 +189,10 @@ export class WOTBinding extends AbstractController {
     const search = await ParametersService.getSearchP(req);
     let identities: any = [];
     if (req.query.pubkey) {
+      const matches = search.match(BMAConstants.PUBLIC_KEY);
+      if (!matches) {
+        throw BMAConstants.ERRORS.NO_IDTY_MATCHING_PUB_OR_UID;
+      }
       identities = await this.IdentityService.searchIdentitiesByPubkey(search);
     }
     else {