Angelo Gladding
lahacker.net

dlv5vbq7lzlthol5 4b942a3185b37d00

angelo@lahacker.net

South Pasadena, California, United States currently feels like 65.17°F

Home CodewebCommits

Use `SystemRandom()` from `secrets`

by Angelo Gladding 09CEF88F29CC1A44

Changed Files

--- a/web/__init__.py

+++ b/web/__init__.py

 import os import pkg_resources import pathlib-import random import re+import secrets import shutil import signal import sys
 import warnings  # mf2py's beautifulsoup's unspecified parser -- force lxml? warnings.simplefilter("ignore") +random = secrets.SystemRandom()+ __all__ = ["application", "serve", "anti_csrf", "form", "secure_form",            "get_nonce", "get_token", "best_match", "sessions", "require_auth",            "tx", "templates", "uri", "kv", "header", "Application"]
         self.wrappers.extend(wrappers)      def add_path_args(self, **path_args):-        self.path_args.update({k: v.replace("\!", nb60_re)+        self.path_args.update({k: v.replace(r"\!", nb60_re)                                for k, v in path_args.items()})      def get(self, path):