Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a0f453b

Browse files
committed
Allow restricted code to get byteorder, getdefaultencoding(),
getrefcount(), maxunicode, and version_info.
1 parent 83d0fd2 commit a0f453b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Lib/rexec.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ class RExec(ihooks._Verbose):
143143
'stat', 'times', 'uname', 'getpid', 'getppid',
144144
'getcwd', 'getuid', 'getgid', 'geteuid', 'getegid')
145145

146-
ok_sys_names = ('copyright', 'exit', 'hexversion', 'maxint', 'platform',
147-
'ps1', 'ps2', 'version')
146+
ok_sys_names = ('byteorder', 'copyright', 'exit', 'getdefaultencoding',
147+
'getrefcount', 'hexversion', 'maxint', 'maxunicode',
148+
'platform', 'ps1', 'ps2', 'version', 'version_info')
148149

149150
nok_builtin_names = ('open', 'file', 'reload', '__import__')
150151

0 commit comments

Comments
 (0)