diff --git a/cps/web.py b/cps/web.py index e1651012..24c5cacd 100644 --- a/cps/web.py +++ b/cps/web.py @@ -1354,7 +1354,7 @@ def login(): @limiter.limit("3/minute", key_func=lambda: request.form.get('username', "").strip().lower()) def login_post(): form = request.form.to_dict() - username = form.get('username', "").strip().lower().replace("\n","\\n").replace("\r","") + username = form.get('username', "").strip().lower().replace("\n","").replace("\r","") try: limiter.check() except RateLimitExceeded: diff --git a/test/Calibre-Web TestSummary_Linux.html b/test/Calibre-Web TestSummary_Linux.html index cbc8dd34..234297de 100644 --- a/test/Calibre-Web TestSummary_Linux.html +++ b/test/Calibre-Web TestSummary_Linux.html @@ -37,20 +37,20 @@
Start Time: 2024-01-13 20:33:30
+Start Time: 2024-01-15 19:07:05
Stop Time: 2024-01-14 03:06:58
+Stop Time: 2024-01-16 00:20:43
Duration: 5h 26 min
+Duration: 4h 41 min
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 57, in test_backup_all - self.assertEqual(11, len(all_files)) -AssertionError: 11 != 0-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 181, in test_backup_change_book_author - self.assertEqual(["Frodo Beutlin","Norbert Halagal","Liu Yang","Hector Gonçalves"], metadata['author']) -AssertionError: Lists differ: ['Frodo Beutlin', 'Norbert Halagal', 'Liu Yang', 'Hector Gonçalves'] != [] - -First list contains 4 additional elements. -First extra element 0: -'Frodo Beutlin' - -- ['Frodo Beutlin', 'Norbert Halagal', 'Liu Yang', 'Hector Gonçalves'] -+ []-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 310, in test_backup_change_book_description - self.assertCountEqual(metadata['description'], "<p><strong>Test</strong></p>") -AssertionError: Element counts were not equal: -First has 0, Second has 4: '<' -First has 0, Second has 2: 'p' -First has 0, Second has 4: '>' -First has 0, Second has 3: 's' -First has 0, Second has 3: 't' -First has 0, Second has 2: 'r' -First has 0, Second has 2: 'o' -First has 0, Second has 2: 'n' -First has 0, Second has 2: 'g' -First has 0, Second has 1: 'T' -First has 0, Second has 1: 'e' -First has 0, Second has 2: '/'-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 264, in test_backup_change_book_language - self.assertEqual(metadata['language'], ["en"]) -AssertionError: Lists differ: [] != ['en'] - -Second list contains 1 additional elements. -First extra element 0: -'en' - -- [] -+ ['en']-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 155, in test_backup_change_book_publisher - self.assertEqual(metadata['publisher'], 'Lo,执|1u') -AssertionError: '' != 'Lo,执|1u' -+ Lo,执|1u-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 205, in test_backup_change_book_publishing_date - self.assertEqual(metadata['pub_date'].date(), date(101, 1, 1)) -AttributeError: 'str' object has no attribute 'date'-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 291, in test_backup_change_book_rating - self.assertCountEqual(metadata['rating']['content'], "6") -TypeError: string indices must be integers-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 125, in test_backup_change_book_series_index - self.assertEqual(metadata['series_index']['content'], "1.53") -TypeError: string indices must be integers+ File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 139, in test_backup_change_book_series_index + self.assertEqual(metadata['series']['content'], "t,st") +AssertionError: 'tEst' != 't,st' +- tEst +? ^ ++ t,st +? ^
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 227, in test_backup_change_book_tags - self.assertEqual(metadata['tags'], ['Lo执|1u']) -AssertionError: Lists differ: [] != ['Lo执|1u'] - -Second list contains 1 additional elements. -First extra element 0: -'Lo执|1u' - -- [] -+ ['Lo执|1u']-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 165, in test_backup_change_book_title - self.assertEqual(metadata['title'], "Buuko") -AssertionError: '' != 'Buuko' -+ Buuko-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 506, in test_backup_change_custom_Comment - custom = json.loads(metadata['custom_8']['content']) -TypeError: string indices must be integers-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 567, in test_backup_change_custom_Enum - custom = json.loads(metadata['custom_6']['content']) -TypeError: string indices must be integers-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 324, in test_backup_change_custom_bool - custom = json.loads(metadata['custom_1']['content']) -TypeError: string indices must be integers-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 533, in test_backup_change_custom_categories - custom = json.loads(metadata['custom_9']['content']) -TypeError: string indices must be integers-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 478, in test_backup_change_custom_date - custom = json.loads(metadata['custom_2']['content']) -TypeError: string indices must be integers-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 358, in test_backup_change_custom_float - custom = json.loads(metadata['custom_5']['content']) -TypeError: string indices must be integers-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 391, in test_backup_change_custom_int - custom = json.loads(metadata['custom_4']['content']) -TypeError: string indices must be integers-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 424, in test_backup_change_custom_rating - custom = json.loads(metadata['custom_3']['content']) -TypeError: string indices must be integers-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 451, in test_backup_change_custom_text - custom = json.loads(metadata['custom_10']['content']) -TypeError: string indices must be integers+ File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata_gdrive.py", line 37, in setUpClass + prepare_gdrive() + File "/home/ozzie/Development/calibre-web-test/test/helper_gdrive.py", line 31, in prepare_gdrive + fs.removetree('test') + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/base.py", line 1320, in removetree + self.remove(_path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 470, in remove + metadata = self._itemFromPath(path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 262, in _itemFromPath + pathIdMap = self._itemsFromPath(path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 252, in _itemsFromPath + metadata = self._childByName(parentId, childName) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 225, in _childByName + raise RuntimeError(f'Folder with id {parentId} has more than 1 child with name {childName}') +RuntimeError: Folder with id 1hm1as7vS6yPzUFGWzFAMYQ-SqvhWJ_Df has more than 1 child with name cover.jpg
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 604, in test_upload_book - self.assertEqual(metadata['title'], details['title']) -AssertionError: '' != 'book' -+ book+ File "/home/ozzie/Development/calibre-web-test/test/test_cli_gdrive.py", line 36, in setUpClass + prepare_gdrive() + File "/home/ozzie/Development/calibre-web-test/test/helper_gdrive.py", line 31, in prepare_gdrive + fs.removetree('test') + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/base.py", line 1320, in removetree + self.remove(_path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 470, in remove + metadata = self._itemFromPath(path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 262, in _itemFromPath + pathIdMap = self._itemsFromPath(path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 252, in _itemsFromPath + metadata = self._childByName(parentId, childName) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 225, in _childByName + raise RuntimeError(f'Folder with id {parentId} has more than 1 child with name {childName}') +RuntimeError: Folder with id 1hm1as7vS6yPzUFGWzFAMYQ-SqvhWJ_Df has more than 1 child with name cover.jpg +
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert_gdrive.py", line 45, in setUpClass + prepare_gdrive() + File "/home/ozzie/Development/calibre-web-test/test/helper_gdrive.py", line 31, in prepare_gdrive + fs.removetree('test') + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/base.py", line 1320, in removetree + self.remove(_path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 470, in remove + metadata = self._itemFromPath(path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 262, in _itemFromPath + pathIdMap = self._itemsFromPath(path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 252, in _itemsFromPath + metadata = self._childByName(parentId, childName) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 225, in _childByName + raise RuntimeError(f'Folder with id {parentId} has more than 1 child with name {childName}') +RuntimeError: Folder with id 1hm1as7vS6yPzUFGWzFAMYQ-SqvhWJ_Df has more than 1 child with name cover.jpg+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert_kepubify_gdrive.py", line 38, in setUpClass + prepare_gdrive() + File "/home/ozzie/Development/calibre-web-test/test/helper_gdrive.py", line 31, in prepare_gdrive + fs.removetree('test') + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/base.py", line 1320, in removetree + self.remove(_path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 470, in remove + metadata = self._itemFromPath(path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 262, in _itemFromPath + pathIdMap = self._itemsFromPath(path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 252, in _itemsFromPath + metadata = self._childByName(parentId, childName) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 225, in _childByName + raise RuntimeError(f'Folder with id {parentId} has more than 1 child with name {childName}') +RuntimeError: Folder with id 1hm1as7vS6yPzUFGWzFAMYQ-SqvhWJ_Df has more than 1 child with name cover.jpg+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_books_author_gdrive.py", line 38, in setUpClass + prepare_gdrive() + File "/home/ozzie/Development/calibre-web-test/test/helper_gdrive.py", line 31, in prepare_gdrive + fs.removetree('test') + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/base.py", line 1320, in removetree + self.remove(_path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 470, in remove + metadata = self._itemFromPath(path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 262, in _itemFromPath + pathIdMap = self._itemsFromPath(path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 252, in _itemsFromPath + metadata = self._childByName(parentId, childName) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 225, in _childByName + raise RuntimeError(f'Folder with id {parentId} has more than 1 child with name {childName}') +RuntimeError: Folder with id 1hm1as7vS6yPzUFGWzFAMYQ-SqvhWJ_Df has more than 1 child with name cover.jpg+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_ebooks_gdrive.py", line 41, in setUpClass + prepare_gdrive() + File "/home/ozzie/Development/calibre-web-test/test/helper_gdrive.py", line 31, in prepare_gdrive + fs.removetree('test') + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/base.py", line 1320, in removetree + self.remove(_path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 470, in remove + metadata = self._itemFromPath(path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 262, in _itemFromPath + pathIdMap = self._itemsFromPath(path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 252, in _itemsFromPath + metadata = self._childByName(parentId, childName) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 225, in _childByName + raise RuntimeError(f'Folder with id {parentId} has more than 1 child with name {childName}') +RuntimeError: Folder with id 1hm1as7vS6yPzUFGWzFAMYQ-SqvhWJ_Df has more than 1 child with name cover.jpg+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_embed_metadata_gdrive.py", line 34, in setUpClass + prepare_gdrive() + File "/home/ozzie/Development/calibre-web-test/test/helper_gdrive.py", line 31, in prepare_gdrive + fs.removetree('test') + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/base.py", line 1320, in removetree + self.remove(_path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 470, in remove + metadata = self._itemFromPath(path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 262, in _itemFromPath + pathIdMap = self._itemsFromPath(path) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 252, in _itemsFromPath + metadata = self._childByName(parentId, childName) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/fs/googledrivefs/googledrivefs.py", line 225, in _childByName + raise RuntimeError(f'Folder with id {parentId} has more than 1 child with name {childName}') +RuntimeError: Folder with id 1hm1as7vS6yPzUFGWzFAMYQ-SqvhWJ_Df has more than 1 child with name cover.jpg
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata_gdrive.py", line 109, in test_backup_gdrive - self.assertTrue(fs.isfile(remote_meta.replace('\\', '/'))) -AssertionError: False is not true-
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_cli.py", line 642, in test_logfile + self.assertTrue("Starting Calibre Web..." in lines, lines) +AssertionError: False is not true : [2024-01-15 19:40:42,385] WARN {cps.config_sql:395} invalidating configuration +[2024-01-15 19:40:42,406] INFO {cps:168} *** "google-api-python-client" version does not meet the requirements. Should: <2.108.0, Found: 2.113.0, please consider installing required version *** +[2024-01-15 19:40:42,406] INFO {cps:168} *** "greenlet" version does not meet the requirements. Should: <2.1.0, Found: 3.0.3, please consider installing required version *** +[2024-01-15 19:40:42,406] INFO {cps:168} *** "PyDrive2" version does not meet the requirements. Should: <1.18.0, Found: 1.19.0, please consider installing required version *** +[2024-01-15 19:40:42,406] INFO {cps:168} *** "google-api-python-client" version does not meet the requirements. Should: <2.108.0, Found: 2.113.0, please consider installing required version ***+
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_cover_edit_books.py", line 81, in test_upload_jpg - self.assertFalse(self.check_element_on_page((By.ID, 'flash_danger'))) -AssertionError: <selenium.webdriver.remote.webelement.WebElement (session="758d3d76-66ea-472a-acf9-730236cb5ef6", element="0768a5fa-79ad-497d-8e26-e14146349e1d")> is not false+
ImportError: Failed to import test module: test_cover_edit_books +Traceback (most recent call last): + File "/usr/lib/python3.10/unittest/loader.py", line 436, in _find_test_path + module = self._get_module_from_name(name) + File "/usr/lib/python3.10/unittest/loader.py", line 377, in _get_module_from_name + __import__(name) + File "/home/ozzie/Development/calibre-web-test/test/test_cover_edit_books.py", line 14, in <module> + from helper_proxy import Proxy, val + File "/home/ozzie/Development/calibre-web-test/test/helper_proxy.py", line 1, in <module> + from mitmproxy import proxy, options + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/mitmproxy/proxy/__init__.py", line 1, in <module> + from .config import ProxyConfig + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/mitmproxy/proxy/config.py", line 9, in <module> + from mitmproxy import options as moptions + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/mitmproxy/options.py", line 4, in <module> + from mitmproxy.net import tls + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/mitmproxy/net/tls.py", line 43, in <module> + "SSLv2": (SSL.SSLv2_METHOD, BASIC_OPTIONS), +AttributeError: module 'OpenSSL.SSL' has no attribute 'SSLv2_METHOD'+
ImportError: Failed to import test module: test_updater +Traceback (most recent call last): + File "/usr/lib/python3.10/unittest/loader.py", line 436, in _find_test_path + module = self._get_module_from_name(name) + File "/usr/lib/python3.10/unittest/loader.py", line 377, in _get_module_from_name + __import__(name) + File "/home/ozzie/Development/calibre-web-test/test/test_updater.py", line 13, in <module> + from helper_proxy import Proxy, val + File "/home/ozzie/Development/calibre-web-test/test/helper_proxy.py", line 1, in <module> + from mitmproxy import proxy, options + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/mitmproxy/proxy/__init__.py", line 1, in <module> + from .config import ProxyConfig + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/mitmproxy/proxy/config.py", line 9, in <module> + from mitmproxy import options as moptions + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/mitmproxy/options.py", line 4, in <module> + from mitmproxy.net import tls + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/mitmproxy/net/tls.py", line 43, in <module> + "SSLv2": (SSL.SSLv2_METHOD, BASIC_OPTIONS), +AttributeError: module 'OpenSSL.SSL' has no attribute 'SSLv2_METHOD'
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert_kepubify.py", line 135, in test_convert_only - self.assertEqual(ret[-1]['result'], 'Finished') -AssertionError: 'Failed' != 'Finished' -- Failed -+ Finished-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert_kepubify_gdrive.py", line 191, in test_convert_only - self.assertEqual(ret[-1]['result'], 'Finished') -AssertionError: 'Failed' != 'Finished' -- Failed -+ Finished-