谢栋梁
91ffb51564
fix: use Path.is_relative_to() for cross-platform dangerous path detection
...
Replace string prefix matching with Path.is_relative_to() to correctly
handle Windows paths like "C:\" where trailing backslash caused double
separator issues (e.g., "C:\\" instead of "C:\").
Changes:
- Use Path.is_relative_to() for subdirectory detection (requires Python 3.9+)
- Add Windows path handling tests using PureWindowsPath
- Update test_utils.py to expect /etc/passwd to be blocked (security fix)
2025-12-05 13:53:39 +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-23 19:07:40 +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-06-24 00:09:19 +02: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-06-22 10:21:19 +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-05 13:53:39 +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-12-05 13:53:39 +08:00
2025-10-07 12:59:09 +04:00
2025-10-04 14:32:47 +04:00
2025-06-21 00:08:11 +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