Commit 6599043
fix(memory): return resolved path from async _validate_path
* fix(memory): return resolved path from async _validate_path to close TOCTOU window
The async _validate_path was returning the unresolved path while the sync
version correctly returned the resolved path, allowing a symlink swap between
validation and use.
* test(memory): add test for async _validate_path symlink TOCTOU fix
Verifies that the async _validate_path returns the resolved real path
rather than the unresolved symlink path, closing the TOCTOU window.
* fix: remove unused temp_directory parameter from test1 parent 715030c commit 6599043
File tree
2 files changed
+34
-1
lines changed- src/anthropic/lib/tools
- tests/lib/tools/memory_tools
2 files changed
+34
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
656 | | - | |
| 656 | + | |
657 | 657 | | |
658 | 658 | | |
659 | 659 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
945 | 945 | | |
946 | 946 | | |
947 | 947 | | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
948 | 981 | | |
949 | 982 | | |
950 | 983 | | |
| |||
0 commit comments