Commit graph

290 commits

Author SHA1 Message Date
Johann150
fc5459dc7a
Update install instruction of Nix in README (#65) 2021-07-28 09:54:08 +02:00
MidAutumnMoon
0667bc38e8
Update install instruction of Nix in README 2021-07-28 15:44:44 +08:00
Johann150
b0d0f64be0
actually bind to multiple addresses
resolves #63

This now causes an error message with the default bindings because on Linux
binding to both IPv6's [::] and IPv4's 0.0.0.0 results in a "port in use" error
2021-07-18 11:30:17 +02:00
Johann150
ba3c01d38f
Add GNU Guix (#62) 2021-07-08 17:03:47 +02:00
Johann150
c4de7ede1f
updated changelog 2021-07-08 17:02:47 +02:00
jgart
43c54693a5
Add GNU Guix System 2021-07-08 02:23:23 -04:00
Johann150
9c15bd5d9a
Add option to disable port check (#61) 2021-06-11 08:00:39 +02:00
dece
ebd32839de update readme with port check skip info 2021-06-11 07:56:18 +02:00
dece
da584ef214 add a test for the port check skip 2021-06-11 07:56:18 +02:00
dece
2f52157c73 add an option to disable the port check 2021-06-11 02:24:17 +02:00
Johann150
64878fd433
add contribution without GitHub & security issues 2021-06-08 11:15:14 +02:00
Johann150
2a718cf73e
update documents for v3.1.0 2021-06-08 08:50:13 +02:00
Matthew Ingwersen
7b1e83ec82
Add regression test for directory traversal 2021-06-08 08:22:42 +02:00
Matthew Ingwersen
3c38dae599
Fix directory traversal vulnerability
When computing the filesystem path to serve, each URL path segment
appended to the content directory path must be checked to ensure that it
consists only of normal filesystem path components (and not the root
directory, .., drive labels, or other special components). Otherwise,
the following directory traversal attacks are possible:

- When an absolute path is pushed onto a PathBuf, the PathBuf will be
  overwritten. If we don't check for absolute paths, Agate can be
  tricked into serving an arbitrary absolute filesystem path via a URL
  like gemini://example.com/%2Fetc/passwd

- The url crate eliminates all .. segments from the URL when parsing,
  even when these are percent-encoded. However, .. can be injected
  into the computed filesystem path by using a URL path segment that,
  when decoded, contains more than one filesystem path component, like
  gemini://example.com/subdir%2F..%2F../outside_content_dir

Furthermore, path separators appearing within a single URL path segment,
like escaped / (%2F), should probably not be considered structural [0].
That is, "a%2Fb" refers to a resource literally named "a/b", not "b" in
subdirectory "a". Thus we also check that a URL path segment represents
no more than one filesystem path segment.

[0] https://www.w3.org/Addressing/URL/4_URI_Recommentations.html
2021-06-08 08:22:00 +02:00
Johann150
aeba1974fe
update dependencies 2021-06-07 20:31:57 +02:00
Johann150
2bc7d6e63a
better error messages when directory listing is disabled
This is possibly also related to #60.

Instead of showing a generic not found error, this shows both the admin and
the user that the directory exists, but directory listing is disabled.
2021-06-06 13:00:24 +02:00
Johann150
14e15d430a
add tests for symbolically linked files & directories
trying to reproduce issue #60
2021-06-06 10:49:20 +02:00
Johann150
f890de24f6
update documents for v3.0.3 2021-05-24 12:59:14 +02:00
Johann150
f1e8335b3e
update dependencies 2021-05-24 12:38:49 +02:00
Johann150
a4bafa2c4e
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.
2021-05-24 12:36:48 +02:00
Johann150
92673c54fb
explicitly mention the --log-ip flag in README
resolves #58
2021-05-03 18:16:09 +02:00
skittlesvampir
356a526708
Updated docker run instructions (#57)
* fixed the path for the certificates inside the docker container, it had changed with cpnfeeny's latest commit
* remove trailing slashes for docker bind mounts for better legibility
* add --name agate to give the container a name
2021-04-26 17:21:48 +02:00
Johann150
2a23320c8d
add hint that subjectAltName is now a required cert field
resolves #55
2021-04-15 17:50:51 +02:00
cpnfeeny
578f9ca276
updating docker tools (#56)
updated the docker run command, changing the -d options to -v.
added a start.sh file and edited the Dockerfile.
2021-04-15 17:31:33 +02:00
Johann150
ac5b030ec2
corrections for docker file (#53) 2021-04-10 16:21:22 +02:00
skittlesvampir
f02b2d19b8
changed example domain in tools/docker/README.md
changed it from `my.gemini.space` to example.org so we won't get any trouble from the owner of this domain
2021-04-10 14:17:20 +00:00
Ben K
93c4ab3748 corrected certficate path for docker container in docker readme 2021-04-10 15:55:18 +02:00
Johann150
34b333118e
update CHANGELOG 2021-04-10 14:54:09 +02:00
Johann150
695a63af48
added docker support (#52) 2021-04-10 14:51:53 +02:00
Ben K
7d7abce9a3 going back to compiling from source but with fewer layers 2021-04-10 14:24:46 +02:00
Ben K
1d0284e888 another try to fix my markdown 2021-04-10 11:50:28 +02:00
Ben K
83c21cb3e9 removed binary file that I accidentially commited 2021-04-10 11:03:04 +02:00
Ben K
a9355a0b8a improved markdown syntax 2021-04-10 10:56:17 +02:00
Ben K
bae20c9f3c changed dockerfile to use binary 2021-04-10 10:50:23 +02:00
Ben K
2e1800a375 added docker support 2021-04-09 11:57:03 +02:00
Johann150
b6122cd2c0
add some information about tests 2021-04-08 23:44:35 +02:00
Johann150
a650f24d24
fix port collision between username and password (#51) 2021-04-08 23:32:38 +02:00
Jack K
8e4d6eb97b
fix port collision between username and password
resolves #50
2021-04-08 21:53:44 +01:00
Johann150
6ce4afb884
fix another spelling mistake 2021-04-08 08:58:52 +02:00
Johann150
f1c71eafc0
update documents for next version 2021-04-08 08:39:44 +02:00
Johann150
1e8aa8ccf0
update changelog 2021-04-08 08:28:35 +02:00
Johann150
f85585155e
switch default cert signing algorithm to ECDSA
resolves #42
resolves #49

I did not expect support for Ed25519 to be so bad as to receive multiple
complaints about it. I did expect some problems, hence why I provided the
--ecdsa flag. I had hoped support would be better to drive those who still
do not support it (while again there is no reason to not support this
algorithm!) to use it.
2021-04-08 00:13:18 +02:00
Johann150
869a784b59
add tests for fragment and userinfo URLs 2021-04-08 00:11:47 +02:00
Johann150
ba9297eabf
implement stricter requirements for request URLs
Addresses changes in the specification, namely these stricter requirements:
0235100151/specification.gmi (L153-155)
2021-04-07 23:54:44 +02:00
Amplifi-Beats
26bda4be1b Update README.md
Changed the misspelling of current from "currrent" to "current"
2021-04-06 10:53:49 -07:00
Johann150
a5425e3a9a
update changelog 2021-03-28 22:27:30 +02:00
Johann150
4b1ad8be20
remove unnecessary feature, next version 2021-03-28 22:24:12 +02:00
Johann150
22ba3e497c
update changelog and homepage 2021-03-27 20:31:07 +01:00
Johann150
16d05c73a0
resolve clippy warning 2021-03-27 20:31:06 +01:00
Johann150
1a537d630f
automatically create certificate directory
resolves #44
2021-03-27 20:31:06 +01:00