-
Notifications
You must be signed in to change notification settings - Fork 22
Fix security issue (#61) #62
Fix security issue (#61) #62
Conversation
Aw, this is great, thank you! Would you mind adding some testing around this as well? |
Also, it looks like your changes are causing tests to fail 😢 |
cdbfa2f
to
e27e967
Compare
I'm not able to get the build setup. I'm running the server on a docker container using the following commands:
which tells me that the server is running on port 80, with localhost (0.0.0.0) forwarding connections from port 8080 to 80 on the server. When I try
I get no response from the server.
|
That was a mistake in the documentation! I have updated the Dockerfile so that the documentation is correct ;) Take a look at the latest commits on The biggest change is that the correct command is in fact |
aae7826
to
a2d7c62
Compare
Sorry, small favor to ask because I changed something in the way that the branches are organized. Would you mind rebasing from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking really great, thank you for your hard work! I found a place where we can optimize the reconstruction of the sanitized path from the stack—see the review details. Also—and this is absolutely my fault—can you rebase from DEGoodmanWilson:master
? I'm reorganizing how the branches work, and trying to return to a mode where mainline development is performed on master
, rather than starting from the last release.
luna/router.cpp
Outdated
|
||
// Build final path from stack | ||
while (not stk.empty()) { | ||
url_comps.push_back(stk.top()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From line 103 forward, we can simplify:
// Build final path from stack
while (not stk.empty())
{
final_path = stk.top()+delimeter+final_path;
stk.pop();
}
// remove trailing '/'
final_path.pop_back();
return final_path;
602c1b1
to
7707390
Compare
954d8b4
to
5a89030
Compare
5a89030
to
f4f7853
Compare
Made the changes, and also rebased from your master branch as well. Let me know if its good to merge in! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for being so patient with this review. I'm really excited that you've chipped in! I've left a comment on your latest revisions, which are quite thoughtful. But I'm going to approve the PR because a) you've written the key tests and b) they pass. Everything else is icing at this point, so if you want to address the remaining comment, feel free, otherwise I will merge this in tomorrow.
Please merge whenever you wish to! :) Thanks for the support with this issue! |
Added a method to check for malicious inputs
Issue: #61
Added a test to check for malicious input to test the
sanitize_path
function