谢栋梁
9ed15f405a
fix: path traversal vulnerability - use prefix matching in is_dangerous_path()
...
The is_dangerous_path() function only did exact string matching,
allowing attackers to bypass protection by accessing subdirectories:
- /etc was blocked but /etc/passwd was allowed
- C:\Windows was blocked but C:\Windows\System32\... was allowed
This minimal fix changes is_dangerous_path() to use PREFIX MATCHING:
- Now blocks dangerous directories AND all their subdirectories
- Paths like /etcbackup are still allowed (not under /etc)
- No changes to DANGEROUS_PATHS list
Security:
- Fixes CWE-22: Path Traversal vulnerability
- Reported by: Team off-course (K-Shield.Jr 15th)
Fixes #312
Fixes #293
2025-12-03 15:29:57 +08:00
..
2025-11-18 20:28:27 +04:00
2025-11-14 01:40:49 -07:00
2025-11-14 01:40:49 -07:00
2025-11-14 01:40:49 -07:00
2025-10-01 18:53:30 +04:00
2025-10-02 11:08:56 +04:00
2025-07-13 10:41:43 -06:00
2025-07-12 20:24:34 -06:00
2025-10-07 12:59:09 +04:00
2025-11-18 20:28:27 +04:00
2025-10-02 08:09:44 +04:00
2025-11-14 01:40:49 -07:00
2025-11-18 20:28:27 +04:00
2025-10-21 10:35:44 +04:00
2025-08-08 12:59:41 +05:00
2025-10-04 21:10:56 +04:00
2025-10-07 12:59:09 +04:00
2025-10-01 18:53:30 +04:00
2025-11-18 20:28:27 +04:00
2025-10-21 10:35:44 +04:00
2025-10-21 10:35:44 +04:00
2025-10-21 10:35:44 +04:00
2025-10-21 10:35:44 +04:00
2025-10-08 11:14:22 +04:00
2025-10-21 10:41:02 +04:00
2025-10-07 17:39:41 +01:00
2025-10-07 17:39:41 +01:00
2025-10-06 23:32:04 +04:00
2025-10-21 10:35:44 +04:00
2025-10-06 00:39:00 +04:00
2025-11-21 09:31:34 +04:00
2025-10-04 13:46:22 +04:00
2025-11-18 20:28:27 +04:00
2025-11-18 20:28:27 +04:00
2025-10-03 22:41:28 +04:00
2025-11-18 20:28:27 +04:00
2025-10-21 10:35:44 +04:00
2025-10-21 10:35:44 +04:00
2025-10-03 11:29:06 +04:00
2025-10-21 10:35:44 +04:00
2025-10-07 12:59:09 +04:00
2025-10-04 21:10:56 +04:00
2025-11-18 20:28:27 +04:00
2025-06-29 00:01:35 +02:00
2025-10-02 12:59:45 +04:00
2025-10-21 10:35:44 +04:00
2025-06-29 00:01:35 +02:00
2025-06-25 17:42:58 +02:00
2025-06-29 00:01:35 +02:00
2025-06-25 17:42:58 +02:00
2025-06-29 00:01:35 +02:00
2025-06-29 00:01:35 +02:00
2025-06-29 00:01:35 +02:00
2025-10-21 10:35:44 +04:00
2025-10-02 11:23:15 +04:00
2025-11-14 01:40:49 -07:00
2025-10-07 12:59:09 +04:00
2025-10-21 10:35:44 +04:00
2025-10-07 12:59:09 +04:00
2025-11-18 20:28:27 +04:00
2025-10-21 10:35:44 +04:00
2025-10-04 21:10:56 +04:00
2025-10-04 13:46:22 +04:00
2025-11-18 20:50:42 +04:00
2025-11-18 20:28:27 +04:00
2025-10-21 10:35:44 +04:00
2025-10-07 12:59:09 +04:00
2025-10-02 10:25:41 +04:00
2025-11-14 01:40:49 -07:00
2025-10-07 12:59:09 +04:00
2025-10-07 12:59:09 +04:00
2025-08-17 16:08:52 +00:00
2025-12-03 15:29:57 +08:00
2025-11-18 20:28:27 +04:00
2025-07-13 06:09:31 -06:00
2025-10-21 11:06:18 +04:00
2025-11-18 20:28:27 +04:00
2025-11-18 20:28:27 +04:00
2025-10-22 17:53:10 +04:00
2025-10-02 23:47:44 +04:00
2025-10-07 12:59:09 +04:00
2025-10-07 12:59:09 +04:00
2025-10-07 12:59:09 +04:00
2025-11-14 01:40:49 -07:00
2025-10-07 12:59:09 +04:00
2025-08-22 09:23:59 +04:00
2025-11-18 20:28:27 +04:00
2025-06-27 14:29:10 +04:00
2025-11-18 20:28:27 +04:00
2025-10-21 10:35:44 +04:00
2025-11-18 20:28:27 +04:00
2025-08-22 09:23:59 +04:00
2025-06-24 18:48:31 +02:00
2025-10-05 08:55:50 +04:00
2025-10-07 12:59:09 +04:00
2025-10-04 14:32:47 +04:00
2025-10-17 23:42:32 +04:00
2025-10-17 23:42:32 +04:00
2025-10-02 11:08:56 +04:00
2025-10-04 21:10:56 +04:00
2025-10-07 12:59:09 +04:00