diff options
author | Martin Fischer <martin@push-f.com> | 2021-07-04 00:25:01 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-07-04 11:19:41 +0200 |
commit | c0b8d6a9876a95bc5d8fd8a30333e65949f5c9d1 (patch) | |
tree | 40bfa7846a11fae026f45aefb3b1a87dbfa59ec6 /src/static/style.css.sha256 | |
parent | 17d98a70a76efc02f643e9cfe13836120a2c5114 (diff) |
strictly enforce Host and Origin headers
Previously the Origin header was only checked if you specified an origin
with --origin on startup and when you didn't we just printed a warning
that this might make you vulnerable to CSRF attacks.
I implemented it this way since I wanted GitPad to be runnable without
any command-line options, but such warnings are of course suboptimal
for security since they can simply be ignored.
This commit changes this behavior so that the Origin header is always
checked for POST requests. If you just run "gitpad" the enforced origin
defaults to http://127.0.0.1:<port>. Additionally this commit also
enforces an exact Host header (extracted from the Origin) to prevent DNS
rebinding attacks.
Diffstat (limited to 'src/static/style.css.sha256')
0 files changed, 0 insertions, 0 deletions