mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-10-30 14:17:40 +00:00
Compare commits
8 Commits
0.45.23
...
pip-securi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2daa6f28b | ||
|
|
963869b40a | ||
|
|
2f91695293 | ||
|
|
162a77079c | ||
|
|
01b81f4dbc | ||
|
|
eb2bd1ec8c | ||
|
|
32f490783a | ||
|
|
2819e05615 |
@@ -1,4 +1,4 @@
|
||||
from . util import live_server_setup, extract_UUID_from_client
|
||||
from .util import live_server_setup, extract_UUID_from_client, wait_for_all_checks
|
||||
from flask import url_for
|
||||
import time
|
||||
|
||||
@@ -19,10 +19,16 @@ def test_check_access_control(app, client, live_server):
|
||||
)
|
||||
|
||||
assert b"1 Imported" in res.data
|
||||
time.sleep(2)
|
||||
res = client.get(url_for("form_watch_checknow"), follow_redirects=True)
|
||||
time.sleep(3)
|
||||
# causes a 'Popped wrong request context.' error when client. is accessed?
|
||||
#wait_for_all_checks(client)
|
||||
|
||||
res = c.get(url_for("form_watch_checknow"), follow_redirects=True)
|
||||
assert b'1 watches queued for rechecking.' in res.data
|
||||
time.sleep(2)
|
||||
time.sleep(3)
|
||||
# causes a 'Popped wrong request context.' error when client. is accessed?
|
||||
#wait_for_all_checks(client)
|
||||
|
||||
|
||||
# Enable password check and diff page access bypass
|
||||
res = c.post(
|
||||
@@ -42,7 +48,7 @@ def test_check_access_control(app, client, live_server):
|
||||
assert b"Login" in res.data
|
||||
|
||||
# The diff page should return something valid when logged out
|
||||
res = client.get(url_for("diff_history_page", uuid="first"))
|
||||
res = c.get(url_for("diff_history_page", uuid="first"))
|
||||
assert b'Random content' in res.data
|
||||
|
||||
# Check wrong password does not let us in
|
||||
@@ -83,6 +89,8 @@ def test_check_access_control(app, client, live_server):
|
||||
res = c.get(url_for("logout"),
|
||||
follow_redirects=True)
|
||||
|
||||
assert b"Login" in res.data
|
||||
|
||||
res = c.get(url_for("settings_page"),
|
||||
follow_redirects=True)
|
||||
|
||||
@@ -160,5 +168,5 @@ def test_check_access_control(app, client, live_server):
|
||||
assert b"Login" in res.data
|
||||
|
||||
# The diff page should return something valid when logged out
|
||||
res = client.get(url_for("diff_history_page", uuid="first"))
|
||||
res = c.get(url_for("diff_history_page", uuid="first"))
|
||||
assert b'Random content' not in res.data
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
eventlet>=0.31.0
|
||||
feedgen~=0.9
|
||||
flask-compress
|
||||
flask-login~=0.5
|
||||
flask-login~=0.6
|
||||
flask-paginate
|
||||
flask_expects_json~=1.7
|
||||
flask_restful
|
||||
flask_wtf
|
||||
flask~=2.0
|
||||
flask~=2.3
|
||||
inscriptis~=2.2
|
||||
pytz
|
||||
timeago~=1.0
|
||||
@@ -51,10 +51,7 @@ lxml
|
||||
|
||||
selenium~=4.14.0
|
||||
|
||||
# https://stackoverflow.com/questions/71652965/importerror-cannot-import-name-safe-str-cmp-from-werkzeug-security/71653849#71653849
|
||||
# ImportError: cannot import name 'safe_str_cmp' from 'werkzeug.security'
|
||||
# need to revisit flask login versions
|
||||
werkzeug~=2.0.0
|
||||
werkzeug
|
||||
|
||||
# Templating, so far just in the URLs but in the future can be for the notifications also
|
||||
jinja2~=3.1
|
||||
|
||||
Reference in New Issue
Block a user