Skip to content

Commit 9e57d44

Browse files
BartyBoi1128s19110
andauthored
Update docs/Secure-Coding-Guide-for-Python/CWE-703/CWE-390/REAME.md
Capitalizing "CTRL+C" to stay consistent Co-authored-by: Hubert Daniszewski <[email protected]> Signed-off-by: BartyBoi1128 <[email protected]>
1 parent 4e8c766 commit 9e57d44

File tree

1 file changed

+1
-1
lines changed
  • docs/Secure-Coding-Guide-for-Python/CWE-703/CWE-390

1 file changed

+1
-1
lines changed

docs/Secure-Coding-Guide-for-Python/CWE-703/CWE-390/REAME.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Printing the stack trace can reveal details and sensitive data about an applicat
2121

2222
In Python `Exception` extends from `BaseException`and a bare `except` will catch everything.
2323

24-
For instance, catching a bare `except` causes a user to be unable to stop a script via `ctrl+c`, due to the base `except` catching all exceptions. In comparison, catching `except Exception` allows a `KeyboardInterrupt` to be the Python interpreter itself or other parts of the code. This is due to `KeyboardInterrupt` extending `BaseException` and not `Exception`.
24+
For instance, catching a bare `except` causes a user to be unable to stop a script via `CTRL+C`, due to the base `except` catching all exceptions. In comparison, catching `except Exception` allows a `KeyboardInterrupt` to be the Python interpreter itself or other parts of the code. This is due to `KeyboardInterrupt` extending `BaseException` and not `Exception`.
2525

2626
Note that using `except Exception` is still too broad as per [CWE-755: Improper Handling of Exceptional Conditions](https://github.com/ossf/wg-best-practices-os-developers/blob/main/docs/Secure-Coding-Guide-for-Python/CWE-703/CWE-755/README.md) and that a more specific exception handling is preferred.
2727

0 commit comments

Comments
 (0)