diff --git a/app/modules/bma/lib/controllers/wot.ts b/app/modules/bma/lib/controllers/wot.ts index 99dda6b48c8db398f935d94660a0c3980e14b734..b5196aa51e1c530262129f071ffad887ebe50427 100644 --- a/app/modules/bma/lib/controllers/wot.ts +++ b/app/modules/bma/lib/controllers/wot.ts @@ -189,8 +189,7 @@ 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) { + if (!BMAConstants.PUBLIC_KEY.test(search)) { throw BMAConstants.ERRORS.NO_IDTY_MATCHING_PUB_OR_UID; } identities = await this.IdentityService.searchIdentitiesByPubkey(search);