Author: Armin Rigo <[email protected]>
Branch: sandbox-2
Changeset: r97130:a781f28cb336
Date: 2019-08-09 19:57 +0200
http://bitbucket.org/pypy/pypy/changeset/a781f28cb336/
Log: Be safe and always enable a check that was meant only for Windows
but that makes sense in case there's an attack on the platform's
strftime()
diff --git a/pypy/module/time/interp_time.py b/pypy/module/time/interp_time.py
--- a/pypy/module/time/interp_time.py
+++ b/pypy/module/time/interp_time.py
@@ -639,7 +639,7 @@
if rffi.getintfield(buf_value, 'c_tm_isdst') < -1 or
rffi.getintfield(buf_value, 'c_tm_isdst') > 1:
raise oefmt(space.w_ValueError, "daylight savings flag out of range")
- if _WIN:
+ if _WIN or space.config.translation.sandbox:
# check that the format string contains only valid directives
length = len(format)
i = 0
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit