Skip to content
This repository has been archived by the owner on Feb 19, 2025. It is now read-only.

V5 whitelist/blacklist #76

Closed
sterrenb opened this issue May 14, 2020 · 10 comments
Closed

V5 whitelist/blacklist #76

sterrenb opened this issue May 14, 2020 · 10 comments
Labels
beta 5 Blocking A dependency is blocking this issue feature New feature or request

Comments

@sterrenb
Copy link
Owner

Since V5 fetching the whitelist with the old format throws a server error:

  • {{ base_url }}?list=white&auth={{ auth }}
  • {{ base_url }}?list=black&auth={{ auth }}

These return a 500 status on my local Pi. Not sure if the API changed or my Pihole installation is funky.

The V5 dashboard seems to get its data http://pi.hole/admin/scripts/pi-hole/php/groups.php with some url encoded form data.

If anyone manages to query their Pi properly, please let me know!

@sterrenb sterrenb added help wanted Extra attention is needed beta 5 labels May 14, 2020
@sterrenb sterrenb mentioned this issue May 18, 2020
@p1r473
Copy link

p1r473 commented May 19, 2020

Is this why the option to whitelist/blacklist seems to be gone in latest Flutterboard?
How can I test this for you?

@sterrenb
Copy link
Owner Author

@p1r473 that is correct! Perhaps you can report the server response from your own Pi-hole.

Try running the following in your browser:

{{ base_url }}?list=white&auth={{ auth }}

This would look something like the following:

http://pi.hole/admin/api.php?list=white&auth=my_token

This used to return a JSON object of the whitelists. On my V5 Pi-hole, the server crashes with a HTTP status code 500.

As a sidenote, the official documentation seems to indicate that the black/whitelisting commands are now only accessible via direct SQL. Not sure how this could be integrated into the app, but I hope there still is an API endpoint somewhere...

@p1r473
Copy link

p1r473 commented May 19, 2020

Same here.
Have you opened a bug at the PiHole github?
https://192.168.1.186:445/admin/api.php?list=white&auth= APIKEY
image

@p1r473
Copy link

p1r473 commented May 19, 2020

Looks like pihole -w and pihole -b still work, The whitelist and blacklist commands.

@sterrenb
Copy link
Owner Author

Same here.
Have you opened a bug at the PiHole github?

Thank you for trying it out 👍. I will try and create an issue over at the Pi-hole team.

Looks like pihole -w and pihole -b still work, The whitelist and blacklist commands.

These are CLI commands right? I've thought about using SSH in the app, but it sounds like a security nightmare.

@sterrenb sterrenb added the Blocking A dependency is blocking this issue label May 19, 2020
@p1r473
Copy link

p1r473 commented May 19, 2020

Yup those are CLI commands.
If you make a PiHole ticket I will back it up with my evidence.

@p1r473
Copy link

p1r473 commented May 22, 2020

@sterrenburg can you link your PiHole GitHub issue so I can post my evidence there?

@sterrenb
Copy link
Owner Author

@sterrenburg can you link your PiHole GitHub issue so I can post my evidence there?

Just now I posted on the Pi-hole discourse, thank you for taking a look:

https://discourse.pi-hole.net/t/black-whitelisting-does-not-work-on-v5-api/33119

The new API is being worked on in a Pi-hole pull, I imagine that the current API interface will need to change on my end once it is released.

@sterrenb sterrenb removed the help wanted Extra attention is needed label May 23, 2020
@sterrenb sterrenb pinned this issue Jun 14, 2020
@sterrenb sterrenb added the feature New feature or request label Jun 16, 2020
@sterrenb sterrenb changed the title V5 whitelist/blacklist API V5 whitelist/blacklist Jun 16, 2020
@elmicha
Copy link

elmicha commented Jul 30, 2020

Here a Pi-hole developer wrote that it is resolved in Pi-hole v5.1 and the current version seems to be 5.1.2, so I guess it's fixed now on the Pi-hole side.

@sterrenb
Copy link
Owner Author

sterrenb commented Aug 5, 2020

@elmicha thank you for bringing this to my attention! Assuming all goes well, I expect to add white-/blacklist support back in the upcoming release.

sterrenb added a commit that referenced this issue Aug 15, 2020
* Add whitelist/blacklist support, fixes #76
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beta 5 Blocking A dependency is blocking this issue feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants