digitalcredentials / dcc-admin-dashboard

Admin tool for issuing DCC Verifiable Credentials
MIT License
2 stars 4 forks source link

missing null check on get-credential-links auth header crashes server #38

Closed jchartrand closed 3 months ago

jchartrand commented 3 months ago

Describe the bug Missing null check on get-credential-links auth header crashes server. This is the line:

https://github.com/digitalcredentials/admin-dashboard/blob/1b26c63ad42bdd2598c79e6fabbcb8f8506f02db/src/endpoints/getCredentialLinks.ts#L18

To Reproduce

  1. issue a GET request to get-credential-links without an auth header
  2. Server crashes

Expected behavior

Should check that auth header exists before invoking 'startsWith' and should also move the check into the try/catch

jchartrand commented 3 months ago

See PR https://github.com/digitalcredentials/admin-dashboard/pull/39

alexfigtree commented 3 months ago

Recently deployed, closing this ticket