Commits

Jerónimo Albi committed 504aa39 Draft

Removed write permissions for group and other in generated files

Comments (0)

Files changed (1)

     else:
         # change read and write permissions on temp file
         owner_rw = (stat.S_IRWXU & ~stat.S_IXUSR)
-        group_rw = (stat.S_IRWXG & ~stat.S_IXGRP)
-        others_rw = (stat.S_IRWXO & ~stat.S_IXOTH)
+        group_rw = (stat.S_IRWXG & ~stat.S_IXGRP & ~stat.S_IWGRP)
+        others_rw = (stat.S_IRWXO & ~stat.S_IXOTH & ~stat.S_IWOTH)
         os.chmod(tmp_file_name, owner_rw | group_rw | others_rw)
 
     return tmp_file_name