Commit Graph

61 Commits (master)

Author SHA1 Message Date
Mike Barnes 5a9b2518be Allow dropping privs on platforms without setresuid()
1 year ago
Mike Barnes 47e075383f Set facility with openlog, fix message priorites.
1 year ago
prx 15d09d2c01 fix user chroot issue + style
1 year ago
prx f8aff7fe05 fix cgi error (file not found) and useless 'unveil' pledge promise
2 years ago
prx 4972df5999 Fix virtualhost support changing the way request is parsed
2 years ago
prx de52acecfc Merge branch 'master' of tildegit.org:solene/vger
2 years ago
Omar Polo ee8569c6e6 simplify cgi function
2 years ago
Omar Polo 16a5ed7b30 drop unnecessary unveil(NULL, NULL)
2 years ago
Omar Polo cbcf4ec9b6 fix redirect when vhost support is enabled
2 years ago
Omar Polo 7431d3eeec Use the correct error codes and meaningful explanations
2 years ago
prx e9be1b73a7 percent-decode uri
2 years ago
prx e87b36c991 check request length for empty and too long
2 years ago
Solene Rapenne e3b5fb2ab3 Revert "deal with too small/long requests"
2 years ago
Solene Rapenne 9525d66afb Revert "follow spec, fread() get nmemb-1"
2 years ago
Solene Rapenne d086262d1a Revert "empty request should works all the time, not only when in virtualhost"
2 years ago
Solene Rapenne 7b0686bdfa empty request should works all the time, not only when in virtualhost
2 years ago
prx fbacb35170 follow spec, fread() get nmemb-1
2 years ago
prx efa1f639fc deal with too small/long requests
2 years ago
Solene Rapenne 458592594e Repair chroot, the only feature that isn't covered by tests
2 years ago
prx 55042768e5 restore parent link in autoindex and add comments
2 years ago
prx de7cd12f9f ignore after ? and make cgi+virtualhost work (sort of)
2 years ago
prx 3510035711 fix unacceptable ../ in autoidx and code formatting
2 years ago
prx 2cc63136f8 alphasort autoindex + add proper error code fir cgi
2 years ago
prx 470e47a018 Add simple cgi support +:
2 years ago
prx f60ea88c8d add mimetype and autoindex option + minor changes
2 years ago
prx 4a1b0c8ce2 fix issue if missing ending '/' and add appropriate test
2 years ago
Solene Rapenne b2ccab7448 Error code = 51 (not found) and redirection is now 30 following specifications Appendix https://gemini.circumlunar.space/docs/specification.html
2 years ago
Solene Rapenne f0f05b83aa Add support to redirection
2 years ago
Solene Rapenne ef93e01091 Remove the port part of the hostname + according test suite
2 years ago
prx d5cf84928e fix tests, initialize all, remove useless var
2 years ago
prx f9dc956824 errcheck strlcat
2 years ago
prx 8aa3acd2d4 add errors checks on strlcpy, fgets, use faster memmove to don't need buffer
2 years ago
prx e3448992bc use macro
2 years ago
prx e3cb05af6d init all
2 years ago
prx 7381464bf7 initialize option
2 years ago
prx 44a767f577 initialize pos
2 years ago
prx 395eeeccea path is supposed to be const. format unveil in a fuction
2 years ago
prx 4e82f1e44c remove unused extension and fix warnings
2 years ago
Florian Obser fa328268e2 No need to copy path to a local buffer, use it directly.
2 years ago
Florian Obser 5a238e8666 Use BUFSIZ for the amount of data to copy through stdio.
2 years ago
Florian Obser bfd1f66350 Return a constant string from the mimes database.
2 years ago
Solene Rapenne 16657e070c Fix file path after chroot()
2 years ago
Florian Obser f28f906b6a stat(2) can fail, rearange error handling to handle this
2 years ago
Florian Obser 75cf996cec safely drop privs
2 years ago
Florian Obser 8d69d84784 errno is not set here
2 years ago
Florian Obser 27bc29da7a sys/ includes go at the front
2 years ago
Florian Obser 3d18122b7e main does not need a prototype
2 years ago
Florian Obser 5b3dc1dd02 Do not include c sources
2 years ago
Solene Rapenne 345215fa9b Code refactoring: get_file_mime got into mime.c and all security code moved into a procedure
2 years ago
Solene Rapenne e9c3945ede Add syslog messages
2 years ago