Download tasks/codeql_python_benchmark51_v2/pyvul-9ba7c665889bf20611cb/patch.diff from Benchanything/checkerbench: direct link, hf CLI and curl.
- Browser
- Download file 1.25 kB
-
https://huggingface.co/datasets/Benchanything/checkerbench/resolve/main/tasks/codeql_python_benchmark51_v2/pyvul-9ba7c665889bf20611cb/patch.diff
- Command line
-
hf download hf://datasets/Benchanything/checkerbench/tasks/codeql_python_benchmark51_v2/pyvul-9ba7c665889bf20611cb/patch.diff
-
curl -L -o patch.diff https://huggingface.co/datasets/Benchanything/checkerbench/resolve/main/tasks/codeql_python_benchmark51_v2/pyvul-9ba7c665889bf20611cb/patch.diff
1.25 kB
| diff --git a/CHANGES.rst b/CHANGES.rst | |
| index 87033da6..70dbab9d 100644 | |
| --- a/CHANGES.rst | |
| +++ b/CHANGES.rst | |
| Unreleased | |
| (:issue:`1510`) | |
| - The debugger detects cycles in chained exceptions and does not time | |
| out in that case. (:issue:`1536`) | |
| +- When running the development server in Docker, the debugger security | |
| + pin is now unique per container. | |
| Version 0.15.2 | |
| diff --git a/src/werkzeug/debug/__init__.py b/src/werkzeug/debug/__init__.py | |
| index c5e4d2d5..9195c79a 100644 | |
| --- a/src/werkzeug/debug/__init__.py | |
| +++ b/src/werkzeug/debug/__init__.py | |
| def get_machine_id(): | |
| return rv | |
| def _generate(): | |
| + # docker containers share the same machine id, get the | |
| + # container id instead | |
| + try: | |
| + with open("/proc/self/cgroup") as f: | |
| + value = f.readline() | |
| + except IOError: | |
| + pass | |
| + else: | |
| + value = value.strip().partition("/docker/")[2] | |
| + | |
| + if value: | |
| + return value | |
| + | |
| # Potential sources of secret information on linux. The machine-id | |
| # is stable across boots, the boot id is not | |
| for filename in "/etc/machine-id", "/proc/sys/kernel/random/boot_id": | |