carefully check unwrap and expect usage

closes #59
I did not find any other cases where the unwrap or expect usage does not depend
on an internal invariant.
This commit is contained in:
Johann150 2021-05-24 12:23:21 +02:00
parent 92673c54fb
commit a4bafa2c4e
No known key found for this signature in database
GPG key ID: 9EE6577A2A06F8F1
3 changed files with 33 additions and 17 deletions

View file

@ -174,10 +174,14 @@ All requests will be logged using this format:
```
The "error:" part will only be logged if an error occurred. This should only be used for informative purposes as the status code should provide the information that an error occurred. If the error consisted in the connection not being established (e.g. because of TLS errors), the status code `00` will be used.
By default, Agate will not log the remote IP addresses because that might be an issue because IPs are considered private data under the EU's GDPR. To enable logging of IP addresses, you can use the `--log-ip` option.
By default, Agate will not log the remote IP addresses because that might be an issue because IPs are considered private data under the EU's GDPR. To enable logging of IP addresses, you can use the `--log-ip` option. Note that in this case some error conditions might still force Agate to log a dash instead of an IP address.
There are some lines apart from these that might occur in logs depending on the selected log level. For example the initial "Listening on..." line or information about listing a particular directory.
Agate uses some status codes that are not valid Gemini status codes when logging errors:
* 00 - there was an error establishing the TLS connection
* 01 - there was an error in fetching the peer's IP address
## Security considerations
If you want to run agate on a multi-user system, you should be aware that all certificate and key data is loaded into memory and stored there until the server stops. Since the memory is also not explicitly overwritten or zeroed after use, the sensitive data might stay in memory after the server has terminated.