Commit Graph

5 Commits

Author SHA1 Message Date
Bram 6be36ba632 Fix path traversal attack in -proto-out-dir (#573)
* Fix path traversal in `-proto-out-dir`

A malicious file descriptor name (e.g. from an untrusted protoset or
server reflection) could escape the output directory through ../
sequences, writing attacker-controlled content to arbitrary paths.

Confine all writes to an `os.Root` opened on the output directory.

* assert

* refactor

---------

Co-authored-by: Scott Blum <dragonsinth@gmail.com>
2026-07-27 15:30:28 -04:00
Joshua Humphries 07361b21ea Use latest protoreflect to fix some bugs (#453)
* update to latest jhump/protoreflect

* be lenient when possible if server cannot furnish all dependencies

* move linting back to go 1.21 instead of latest go 1.22

* make staticcheck happy
2024-04-09 17:50:10 -04:00
Joshua Humphries 8d7770a962 use latest version of protoreflect (#212) 2021-02-22 17:32:40 -05:00
Joshua Humphries ba5f667e13 fix latest CI breakages by forking code from grpc-go's interop/testing
Also moves testing package to internal/testing
2020-08-31 14:44:59 -04:00
Joshua Humphries ccc9007156 add -protoset-out option (#120) 2019-09-30 09:50:17 -04:00