codeths / codeths/eths-extension
Missing `alertToken` in registration data
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
The extension sends an empty `alertToken` value in calls to the registration endpoint, which rejects the request because it's missing.
This means we fail to register, and over time we seem to have gotten to a point where none of the devices can even ping anymore because they all need to re-register.
## Example request:
```http
POST http://dashboard-web:3000/api/v1/ext/register
Host: dashboard-web
User-Agent: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Content-Length: 105
Accept: */*
Accept-Encoding: gzip, br
Accept-Language: en-US,en;q=0.9
Content-Type: application/json
Origin: chrome-extension://oficjjabjafibcdahidnjoghiliekgjg
Priority: u=1, i
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: cross-site
X-Extension-Version: 0.2.4.0
{
"serial": "XXXXXXXX",
"alertToken": "",
"email": "XXXXXX@eths202.org",
"googleID": "XXXXXXXXXXXXXXX"
}
```
## Response:
```http
400 Bad Request
X-Powered-By: Express
Access-Control-Allow-Origin: chrome-extension://oficjjabjafibcdahidnjoghiliekgjg
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Content-Type, X-Extension-Version
Access-Control-Allow-Methods: POST, PUT
Content-Type: application/json; charset=utf-8
Content-Length: 85
Date: Thu, 03 Jul 2025 00:46:33 GMT
Connection: keep-alive
Keep-Alive: timeout=5
{
"message": [
"alertToken should not be empty"
],
"error": "Bad Request",
"statusCode": 400
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.