Do not send a body for non success responses #17

Closed
opened 2020-06-13 15:17:43 -04:00 by tobias · 2 comments
Contributor

The gemini spec says:

If does not belong to the "SUCCESS" range of codes, then the server MUST close the connection after sending the header and MUST NOT send a response body.

But gemini-serve-file-or-directory tries e.g. to return "Internal server error" which fails since it is a string and not octets

The gemini spec says: > If <STATUS> does not belong to the "SUCCESS" range of codes, then the server MUST close the connection after sending the header and MUST NOT send a response body. But gemini-serve-file-or-directory tries e.g. to return `"Internal server error"` which fails since it is a string and not octets
Author
Contributor

Further testing shows, that .../...// is internally converted to ../ and thus files outside of the document root might be listed and also read if they have an extension recognized by mimes:mime

Further testing shows, that `.../...//` is internally converted to `../` and thus files outside of the document root might be listed and also read if they have an extension recognized by `mimes:mime`
Owner

Fixed.

Fixed.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jmcbray/germinal#17
No description provided.