diff --git a/cps/web.py b/cps/web.py index e0224b7c..8445196f 100644 --- a/cps/web.py +++ b/cps/web.py @@ -91,10 +91,10 @@ def add_security_headers(resp): if request.endpoint == "edit-book.show_edit_book" or config.config_use_google_drive: csp += " *;" elif request.endpoint == "web.read_book": - csp += " style-src-elem 'self' blob: 'unsafe-inline';" + csp += " blob:; style-src-elem 'self' blob: 'unsafe-inline';" else: csp += ";" - csp += "object-src: 'none';" + csp += " object-src 'none';" resp.headers['Content-Security-Policy'] = csp resp.headers['X-Content-Type-Options'] = 'nosniff' resp.headers['X-Frame-Options'] = 'SAMEORIGIN' diff --git a/setup.cfg b/setup.cfg index 0b07ca25..3b208345 100644 --- a/setup.cfg +++ b/setup.cfg @@ -38,7 +38,7 @@ console_scripts = [options] include_package_data = True install_requires = - APScheduler>=3.6.3,<3.10.0 + APScheduler>=3.6.3,<3.11.0 werkzeug<2.1.0 Babel>=1.3,<3.0 Flask-Babel>=0.11.1,<3.1.0 diff --git a/test/Calibre-Web TestSummary_Linux.html b/test/Calibre-Web TestSummary_Linux.html index a2c53d30..00d5d287 100644 --- a/test/Calibre-Web TestSummary_Linux.html +++ b/test/Calibre-Web TestSummary_Linux.html @@ -37,20 +37,20 @@
Start Time: 2023-02-05 20:51:25
+Start Time: 2023-02-09 19:47:18
Stop Time: 2023-02-06 03:15:11
+Stop Time: 2023-02-10 02:15:25
Duration: 5h 28 min
+Duration: 5h 32 min
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_edit_ebooks_gdrive.py", line 230, in test_edit_title - self.assertEqual(ele.text, u'Very long extra super turbo cool title without any issue of displaying including ö utf-8 characters') -AssertionError: 'Pipo|;.:' != 'Very long extra super turbo cool title wi[54 chars]ters' -- Pipo|;.: -+ Very long extra super turbo cool title without any issue of displaying including ö utf-8 characters+ File "/home/ozzie/Development/calibre-web-test/test/test_edit_ebooks_gdrive.py", line 225, in test_edit_title + self.assertEqual(u'Pipo|;.:', title.get_attribute('value')) +AssertionError: 'Pipo|;.:' != None
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_ldap.py", line 1001, in test_ldap_opds_anonymous - self.assertEqual(200, r.status_code) -AssertionError: 200 != 401-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_ldap.py", line 832, in test_ldap_opds_download_book - self.fill_basic_config({'config_ldap_provider_url': '127.0.0.1', - File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 392, in fill_basic_config - cls._fill_basic_config(elements) - File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 302, in _fill_basic_config - WebDriverWait(cls.driver, 5).until(EC.presence_of_element_located((By.ID, "config_port"))) - File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/support/wait.py", line 90, in until - raise TimeoutException(message, screen, stacktrace) -selenium.common.exceptions.TimeoutException: Message: -Stacktrace: -RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8 -WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:180:5 -NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:392:5 -element.find/</<@chrome://remote/content/marionette/element.sys.mjs:275:16-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_login.py", line 151, in test_login_protected - self.assertEqual(self.fail_access_page("http://127.0.0.1:8083/search"), 1) -AssertionError: 2 != 1-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_opds_feed.py", line 181, in test_opds_guest_user - self.assertEqual(200, r.status_code) -AssertionError: 200 != 401-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_opds_feed.py", line 564, in test_opds_search - self.assertEqual(401, r.status_code) -AssertionError: 401 != 200-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_opds_feed.py", line 34, in tearDownClass - cls.stop_calibre_web() - File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 480, in stop_calibre_web - cls.driver.find_element(By.ID, 'admin_stop').click() - File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 856, in find_element - return self.execute(Command.FIND_ELEMENT, { - File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 434, in execute - self.error_handler.check_response(response) - File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py", line 243, in check_response - raise exception_class(message, screen, stacktrace) -selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [id="admin_stop"] -Stacktrace: -RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8 -WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:180:5 -NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:392:5 -element.find/</<@chrome://remote/content/marionette/element.sys.mjs:275:16-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_reader.py", line 83, in test_epub_reader - self.driver.switch_to.frame(self.check_element_on_page((By.XPATH,"//iframe[starts-with(@id, 'epubjs-view')]"))) - File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/switch_to.py", line 94, in frame - self._driver.execute(Command.SWITCH_TO_FRAME, {'id': frame_reference}) - File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 434, in execute - self.error_handler.check_response(response) - File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py", line 243, in check_response - raise exception_class(message, screen, stacktrace) -selenium.common.exceptions.InvalidArgumentException: Message: data did not match any variant of untagged enum FrameId at line 1 column 13-