Abort response when path doesn't start with slash#5205
Merged
Conversation
b4f396b to
19c3b04
Compare
nickva
reviewed
Aug 26, 2024
nickva
approved these changes
Aug 26, 2024
078c42d to
0a323a8
Compare
Currently a path that doesn't begin with a `/` causes a no match error
and crash. This can fill up logs with unwanted junk, and be generally
annoying.
```
2024-08-23 17:54:26.603 08/23 17:54:26.603 somehost db13 - CRASH REPORT Process (<0.19262.7388>) with 0 neighbors crashed with reason: no match of right hand value {"..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\windows\\win.ini",[],[]} at chttpd:handle_request_int/1(line:239) <= mochiweb_http:headers/6(line:140) <= proc_lib:init_p_do_apply/3(line:240); initial_call: {mochiweb_acceptor,init,['Argument__1','Argument__2',...]}, ancestors: [chttpd,chttpd_sup,<0.1261.0>], message_queue_len: 0, links: [<0.1450.0>,#Port<0.891112>], dictionary: [{couch_rewrite_count,0}], trap_exit: false, status: running, heap_size: 610, stack_size: 28, reductions: 3198
```
This adds a check for path validity, and exits with a shutdown if the
path is invalid.
0a323a8 to
093cb19
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Currently a path that doesn't begin with a
/causes a no match error and crash. This can fill up logs with unwanted junk, and be generally annoying.This adds a check for path validity, and exits with a shutdown if the path is invalid.
Testing recommendations
Related Issues or Pull Requests
Checklist
rel/overlay/etc/default.inisrc/docsfolder