HHousen / lecture2notes

Audit required: Use of an insecure method method from urllib detected BAN-B310
Security
Major
3 years ago4 years old
Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
41date = datetime_object.isoformat("T") + "Z"
42
43if page_link.lower().startswith("http"):
44    soup = BeautifulSoup(urllib.urlopen(page_link), features="html.parser")45else:
46    raise ValueError from None
47