Return True if expanded equals allowed or is a subpath of it.
(expanded, allowed)
| 63 | |
| 64 | |
| 65 | def _is_within(expanded, allowed): |
| 66 | """Return True if expanded equals allowed or is a subpath of it.""" |
| 67 | return expanded == allowed or expanded.startswith(allowed + os.sep) |
| 68 | |
| 69 | |
| 70 | def validate_api_key_path(file_path): |
no outgoing calls
no test coverage detected