Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v5 : php script sub.php is missing #1297

Closed
3 tasks done
coop-git opened this issue May 15, 2020 · 6 comments · Fixed by #1480
Closed
3 tasks done

v5 : php script sub.php is missing #1297

coop-git opened this issue May 15, 2020 · 6 comments · Fixed by #1480

Comments

@coop-git
Copy link

How familiar are you with the the source code relevant to this issue?:
8, I can read/write PHP


Expected behaviour:

Domains are removed from the whitelist/blacklist when making a POST to admin/api.php?list=black&sub=domain.com
admin/api.php?list=black&add=domain.com works fine

Actual behaviour:

Domains are not added to blacklist when making a POST to admin/api.php?list=black&sub=domain.com

Steps to reproduce:

do a POST to admin/api.php?list=black&add=domain.com
Check blacklist: domain is added : OK
do a POST to admin/api.php?list=black&sub=domain.com
Check blacklist : domain is still there NOK

Troubleshooting undertaken, and/or other relevant information:

Opened api.php to see what it refers to
It refers to add.php and sub.php
add.php is available but sub.php is missing.

@dschaper dschaper transferred this issue from pi-hole/pi-hole May 15, 2020
@Scratchcat1
Copy link

The same applies for making a GET request to admin/api.php?list. The request errors out because get.php is also missing.

@PromoFaux
Copy link
Member

Looks like the files were removed in this pull request

#1154

@DL6ER , is the idea here that folks consuming the API should use groups.php instead?

@DL6ER
Copy link
Member

DL6ER commented May 16, 2020

Maybe I wasn't aware of the possibility to add and remove domains through the API, at least I'm aware of this feature right now. groups.php should be a more than adequate alternative, however, authentication may be an issue.

I cannot submit a patch myself for a few days, neither can I test things, so you won't see a fix for this from me.

@PromoFaux
Copy link
Member

No rush, enjoy yourself! I may even look at it if I have some time

@pralor-bot
Copy link

This issue has been mentioned on Pi-hole Userspace. There might be relevant details there:

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

@pralor-bot
Copy link

This issue has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pi-hole-5-1-released/35577/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants