Hi, I get an error, unable to complete update, please contact support. Last lines shown below.
[i] Target: https://dbs.oisd.nl
[✓] Status: Retrieval successful
[i] Adding adlist with ID 42 to database table...
[✗] Unable to fill table gravity in database /etc/pihole/gravity.db
/tmp/tmp.oHouQjZqDq.gravity:88: unescaped " character
/tmp/tmp.oHouQjZqDq.gravity:88: unescaped " character
/tmp/tmp.oHouQjZqDq.gravity:2: unterminated "-quoted field
/tmp/tmp.oHouQjZqDq.gravity:2: expected 2 columns but found 1 - filling the rest with NULL
/tmp/tmp.oHouQjZqDq.gravity:2: INSERT failed: NOT NULL constraint failed: gravity.adlist_id
[✓] Cleaning up stray matter
[✓] DNS service is running
[✓] Pi-hole blocking is Enabled
Error: Unable to complete update, please contact support
When I run a debug I also get an error, that it's not able to upload the debug log:
[✓] ** FINISHED DEBUGGING! **
* The debug log can be uploaded to tricorder.pi-hole.net for sharing with developers only.
* For more information, see: https://pi-hole.net/2016/11/07/crack-our-medical-tricorder-win-a-raspberry-pi-3/
* If available, we'll use openssl to upload the log, otherwise it will fall back to netcat.
[i] Debug script running in automated mode
* Using curl for transmission.
[✗] There was an error uploading your debug log.
* Please try again or contact the Pi-hole team for assistance.
* A local copy of the debug log can be found at: /var/log/pihole_debug.log
We should do something to detect malicious stuff before trying to add or to the database (even if it cannot hurt anyone by construction). I'll think about it over the day if noone beats me to it.
How can we do that though? We just see the contents of the URL, if we get in to sanitizing things then we just replicate the mess that is in the current code that tries to filter out domain names from content.
We could reject anything that contains a non-domain name character, but then we have to account for comments and IP addresses. I don't know of a non-trivial way to detect if the content is in hosts format or not.