mirror of
https://github.com/benbusby/whoogle-search.git
synced 2026-04-25 20:25:51 +03:00
[GH-ISSUE #987] [BUG] binascii.Error: Incorrect padding #612
Labels
No labels
Fixed (Pending PR Merge)
Stale
bug
enhancement
enhancement
good first issue
help wanted
keep-open
needs more info
pull-request
question
theme
unfortunate
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/whoogle-search#612
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @un99known99 on GitHub (Apr 14, 2023).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/987
searching via whoogle, clicking in result list from ALL (ALLE) to PICTURES (BILDER):
same for "weiter" / continue, trying to see more search results:
Getting error in logfile:
pi@pihole:[/var/log] $ cat whoogle.log
ERROR:app:Exception on /search [GET]
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.9/site-packages/flask/app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
File "/home/pi/.local/lib/python3.9/site-packages/flask/app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/pi/.local/lib/python3.9/site-packages/flask/app.py", line 1818, in full_dispatch_request
rv = self.preprocess_request()
File "/home/pi/.local/lib/python3.9/site-packages/flask/app.py", line 2309, in preprocess_request
rv = self.ensure_sync(before_func)()
File "/home/pi/.local/lib/python3.9/site-packages/app/routes.py", line 158, in before_request_func
g.user_config = g.user_config.from_params(g.request_params)
File "/home/pi/.local/lib/python3.9/site-packages/app/models/config.py", line 143, in from_params
params_new = self._decode_preferences(params['preferences'])
File "/home/pi/.local/lib/python3.9/site-packages/app/models/config.py", line 214, in _decode_preferences
brotli.decompress(urlsafe_b64decode(preferences.encode()))
File "/usr/lib/python3.9/base64.py", line 133, in urlsafe_b64decode
return b64decode(s)
File "/usr/lib/python3.9/base64.py", line 87, in b64decode
return binascii.a2b_base64(s)
binascii.Error: Incorrect padding
@un99known99 commented on GitHub (Apr 15, 2023):
might be revealed again => https://github.com/benbusby/whoogle-search/issues/910
@un99known99 commented on GitHub (Apr 15, 2023):
Seems Whoogle not working properly together with Firefox, cant get the search work correctly, seems to be ok for Vivaldi and Brave for example.
Is this known issue that FF desktop not working properly with Whoogle?
@un99known99 commented on GitHub (Apr 21, 2023):
anyone able to help?
@un99known99 commented on GitHub (May 11, 2023):
any help here? Still the error:
ERROR:app:Exception on /search [GET]
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.9/site-packages/flask/app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
File "/home/pi/.local/lib/python3.9/site-packages/flask/app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/pi/.local/lib/python3.9/site-packages/flask/app.py", line 1818, in full_dispatch_request
rv = self.preprocess_request()
File "/home/pi/.local/lib/python3.9/site-packages/flask/app.py", line 2309, in preprocess_request
rv = self.ensure_sync(before_func)()
File "/home/pi/.local/lib/python3.9/site-packages/app/routes.py", line 158, in before_request_func
g.user_config = g.user_config.from_params(g.request_params)
File "/home/pi/.local/lib/python3.9/site-packages/app/models/config.py", line 143, in from_params
params_new = self._decode_preferences(params['preferences'])
File "/home/pi/.local/lib/python3.9/site-packages/app/models/config.py", line 214, in _decode_preferences
brotli.decompress(urlsafe_b64decode(preferences.encode()))
File "/usr/lib/python3.9/base64.py", line 133, in urlsafe_b64decode
return b64decode(s)
File "/usr/lib/python3.9/base64.py", line 87, in b64decode
return binascii.a2b_base64(s)
binascii.Error: Incorrect padding
@benbusby commented on GitHub (May 19, 2023):
Hi, sorry for the delay! I believe the issue you're encountering should be fixed now, although I wasn't able to reproduce it on my end unfortunately. The preferences string should be encoded correctly (and therefore have the correct padding), but perhaps Firefox is stripping the padding from the param?
In any case, padding is now manually appended to the end of the value, which should fix this for you. Let me know if I can help further.
@un99known99 commented on GitHub (May 27, 2023):
@benbusby - many thanks for the feedback, it is indeed a bit strange, other browser apart from FF (vivaldi, brave, etc.) are doing ok - on desktop, on mobile all are in fact OK, even FF
If I could provide more info just let me know.
So the fix you mentioned will be in 0.8.3?