Skip to content

use exact match for illegal path check#34539

Merged
htuch merged 6 commits intoenvoyproxy:mainfrom
zhangbo1882:main
Jun 14, 2024
Merged

use exact match for illegal path check#34539
htuch merged 6 commits intoenvoyproxy:mainfrom
zhangbo1882:main

Conversation

@zhangbo1882
Copy link
Copy Markdown
Contributor

@zhangbo1882 zhangbo1882 commented Jun 5, 2024

In our environment, the file system directory is as follows:

Tue Jun 04 22:28:35][#48# ]$df -h
Filesystem                 Size  Used Avail Use% Mounted on
tmpfs                       77G  104K   77G   1% /dev/shm
tmpfs                       31G  9.8M   31G   1% /run
tmpfs                      5.0M     0  5.0M   0% /run/lock
tmpfs                      4.0M     0  4.0M   0% /sys/fs/cgroup
/dev/mapper/atomicos-root  150G  144G  5.8G  97% /sysroot
/dev/vda2                  483M   84M  400M  18% /boot
/dev/vdc                   1.2T   87G  1.1T   8% /sysroot/home/centos/external

We have a directory named /sysroot. If the envoy config file is the that directory, envoy can not start up.

[2024-06-04 22:28:35.581][3382724][critical][main] [source/server/server.cc:131] error initializing configuration 'configs/envoy.yaml': Invalid path: configs/envoy.yaml
[2024-06-04 22:28:35.581][3382724][info][main] [source/server/server.cc:972] exiting
Invalid path: configs/envoy.yaml

In my mind, envoy should only check the default system directory such as /dev /sys /proc as illegal path.
So it is better to use exact match instead of startwith match.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants