CenterForDigitalHumanities / CenterForDigitalHumanities/TPEN-services

Validate PUT /profile request bodies

Open
#330 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Values for the keys provided in request bodies are not validated. They also are not limited in any way, and I can essentially provide an infinite number of keys. For example, the following request body succeeds in updating my profile with these values.

```JSON
{
"imageURL": "https://avatars.githubusercontent.com/u/3287006?v=4",
"displayName": "THEHABES",
"name": "THEHABES",
"orchidId": "0009-0008-6288-0257",
"nsfId": "not an id",
"institutionalId": 123123,
"linkedin": "while(true) return true",
"twitter": "not an url",
"instagram": "not an url",
"facebook": "not an url",
"github": "not an url",
"homepage": "not an url"
"silly": "goose",
"bryan": "dude",
"and" : "so on"
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.