Conversation
|
BUG report 1
|
|
BUG report 2
|
|
BUG report 3
|
|
Great bug hunting, and a really good write up - good job!
I think this is more around "parsing doesn't stop at space characters" rather than "if content begins with hashtag"... The example is a good one, but the problem feels more general than what's described in this issue report. |
| 1. Get the note and check if owner of that note is authenticated user, reject the request if it's not. | ||
| 2. In the [GetNodeById](api/model/notes.go) function, modify DB query so it looks for notes by ID and Owner. | ||
|
|
||
| There are pros and cons to both solutions, but I decided to go with the 1st approach as it clearly sends a message to the user that they do not have access to it. If we send note not found, it might confuse the user since they are making a request by ID. |
There was a problem hiding this comment.
This is an interesting trade-off - the down-side of saying "no permission" rather than "note not found" is that we leak information to an attacker about what notes do exist. In general I'd say the important thing is that you handle the "not found" and "no permissions" case the same - use the same status code for both, and give a message along the lines of "Either the note didn't exist, or you didn't have permission to delete it."
This is slightly less important when handling random IDs, but becomes more important when you could be leaking personal data (e.g. whether a particular email address is signed up to your service).
There was a problem hiding this comment.
Yes I did think of leaking information, we definitely do not want to confirm/deny existence of anything that's sensitive.
I like the idea of giving a vague message, I'll go with that one.
|
BUG report 5
|
|
BUG report 6
|
|
BUG report 7
|
|
BUG report 8
|



Notes available in Notes file
Bugs and issues fixed in this PR:
time.After)Backfill tests: