use re2 instead of re to avoid ReDOS attack

This commit is contained in:
Son Nguyen Kim 2021-09-21 10:57:36 +02:00
parent 1a6c68e98d
commit 1d09d76cb2
5 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
import re
import re2 as re
from typing import Optional
from email_validator import validate_email, EmailNotValidError

View File

@ -1,4 +1,4 @@
import re
import re2 as re
from threading import Thread
from flask import render_template, request, redirect, url_for, flash

View File

@ -1,4 +1,4 @@
import re
import re2 as re
from flask import render_template, request, flash, redirect, url_for
from flask_login import login_required, current_user

View File

@ -4,7 +4,7 @@ import enum
import os
import quopri
import random
import re
import re2 as re
import time
import uuid
from copy import deepcopy

View File

@ -2,7 +2,7 @@
https://github.com/petermat/spamassassin_client
"""
import logging
import re
import re2 as re
import select
import socket
from io import BytesIO