equal
deleted
inserted
replaced
1 import logging |
1 import logging |
2 import re |
2 import re |
3 |
3 |
4 from .database import WithSession |
4 from .database import WithSession |
5 from model import User |
5 from ..model import User |
6 |
6 |
7 from error import UserNotFound, InterfaceException, ValidateException |
7 from ..error import UserNotFound, InterfaceException, ValidateException |
8 |
|
9 |
8 |
10 |
9 |
11 def rehash(hash): |
10 def rehash(hash): |
12 if not re.match(r'^[a-f0-9]{15,}$', hash.lower()): |
11 if not re.match(r'^[a-f0-9]{15,}$', hash.lower()): |
13 raise ValidateException() |
12 raise ValidateException() |