Commit graph

320 commits

Author SHA1 Message Date
Johann150
010d020ba1
add tests for directory listing 2021-11-07 15:24:01 +01:00
Johann150
d10c512253
add ability for preamble to directory list 2021-11-07 15:23:29 +01:00
Johann150
56795d098a
renumber ports in tests 2021-11-07 15:00:41 +01:00
dependabot[bot]
a75e270719
chore(deps): bump tokio-rustls from 0.23.0 to 0.23.1 (#93) 2021-11-01 12:50:40 +01:00
dependabot[bot]
2cb7639480
chore(deps): bump syn from 1.0.80 to 1.0.81 (#94) 2021-11-01 12:44:10 +01:00
dependabot[bot]
d45980e449
chore(deps): bump libc from 0.2.105 to 0.2.106 (#95) 2021-11-01 12:43:50 +01:00
dependabot[bot]
58e563fee8
chore(deps): bump tokio from 1.12.0 to 1.13.0 (#96) 2021-11-01 12:43:31 +01:00
dependabot[bot]
1da1d2d7bf
chore(deps): bump tokio-macros from 1.5.0 to 1.5.1 (#92) 2021-11-01 12:43:15 +01:00
dependabot[bot]
b040722f4e
chore(deps): bump proc-macro2 from 1.0.30 to 1.0.32 (#90) 2021-10-30 10:52:14 +02:00
dependabot[bot]
f427ffcaac
bump pem from 1.0.0 to 1.0.1 (#89) 2021-10-26 16:40:26 +02:00
Johann150
df29c7e9cc
fix changelog links 2021-10-25 17:56:36 +02:00
Johann150
37eef3dc9b
update dependencies 2021-10-25 17:49:02 +02:00
Johann150
6af5efbf67
make process of starting listeners synchronous
Alternatively, a semaphore could have been used which might be a bit faster,
but since the start up process is only used once this simpler solution is
not at a significant disadvantage while being much simpler.
2021-10-22 14:21:40 +02:00
dependabot[bot]
4fee512843
chore(deps): bump bumpalo from 3.7.1 to 3.8.0 (#86) 2021-10-22 11:49:57 +02:00
j-k
57e4054cbe
remove perms and ignore dependabot prs for cargo audit check (#84)
It's meant to only run on commits on master but just to be safe
2021-10-19 18:33:11 +02:00
j-k
7cb0696f3f
bump minimum required deps (#85) 2021-10-19 18:32:52 +02:00
Johann150
b5a416fc35
update rustls and related dependencies (#72)
* chore(deps): bump rustls from 0.19.1 to 0.20.0
* chore(deps): bump webpki from 0.21.4 to 0.22.0
* chore(deps): bump tokio-rustls from 0.22.0 to 0.23.0
* update rustls calls
* update webpki naming
* update tests
2021-10-19 00:30:38 +02:00
Johann150
824d384693
update dependencies 2021-10-18 23:25:51 +02:00
Johann150
246f7a2e02
release v3.1.2 2021-10-15 18:01:07 +02:00
dependabot[bot]
6d3bc1fc0c
chore(deps): bump rcgen from 0.8.13 to 0.8.14 (#80) 2021-10-15 15:24:12 +02:00
Johann150
9556579de0
try to detect dual stack address in use error
If multiple unspecified addresses are used, issue a warning if listening to
it after the first time fails because the system probably already listens in
dual stack mode. Assumes that IPv6 and IPv4 are used. If such addresses are
passed in manually, thats the admins problem for setting up something stupid
in case it goes wrong.
2021-10-14 23:14:46 +02:00
j-k
8813196bdb
ignore dependabot prs for clippy annotations (#78) 2021-10-14 20:45:45 +02:00
Johann150
aaf3279e95
release v3.1.1 2021-10-14 17:38:36 +02:00
dependabot[bot]
213c775671
chore(deps): bump slab from 0.4.4 to 0.4.5 (#76) 2021-10-14 17:32:27 +02:00
dependabot[bot]
16a17ed76c
chore(deps): bump env_logger from 0.8.4 to 0.9.0 (#74) 2021-10-14 17:12:18 +02:00
dependabot[bot]
225d3495d1
chore(deps): bump tokio-macros from 1.4.1 to 1.5.0 (#73) 2021-10-14 17:11:42 +02:00
j-k
0d0c2407ab
update dependencies, add dependabot (#70)
* update dependencies
* add some status badges
    crates.io
    testing status
    dependency status
* add cargo-audit ci
* add dependabot for cargo and github actions updates
2021-10-14 15:28:51 +02:00
Johann150
a1649b9fda
update dependencies 2021-08-27 15:18:56 +02:00
Johann150
2359127167
move release script
Putting it in the top level can cause confusion.
Resolves #69
2021-08-27 15:14:27 +02:00
skittlesvampir
42262ef4ed
Changed to Dockerfile to automatically download newest release (#66)
Co-authored-by: Ben K <7563474-tracking-ng@users.noreply.gitlab.com>
2021-08-15 17:18:30 +02:00
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