eclipse-thingweb / eclipse-thingweb/node-wot
Possible bug in Servient.addCredentials() method?
- Dominant language
- TypeScript
- Stars
- 192
- Forks
- 100
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 6
Description
Hey all!
While I was trying to develop something to test security of the things, I've observed that `addCredentials()` method of `Servient` class is behaving in an unexpected way. For example, in the following gist you can see that I have a thing with basic auth. of HTTP (tried with HTTPS btw., same problem) and I have a consumer thing to do -hopefully- pentesting. First, the credentials in the consumer thing is consciously set up in a wrong way. After first denial, credentials are set to the same of exposed thing's (affirmed with `getCredentials()`), yet it still receives 401 from the exposed thing on the second trial (?). An interesting point here is that if I comment out the **first** `addCredentials()` method in consumer thing, then on the second trial it successes.
https://gist.github.com/erceguder/a54adfe2e486f0efd6fd6dcbae8f9efa
Contributor guide
Assessment
This issue has not been assessed yet.