Comments (7)
I'm not sure if this issue should be handle in the web interface or in FTL.
In v5
, the first step executed by PHP is to split the input into an array of domains:
In this case, the expected value for the domain field ($_POST['domain']
) is a string with one or more domains separated by spaces.
The current v6
web interface doesn't use a server side code here. It sends the whole text to the API. FTL doesn't seems to take care of spaces or line breaks and the whole string is used.
from ftl.
FTL doesn't seems to take care of spaces or line breaks and the whole string is used.
Exactly, FTL expects one domain to be added per request. I think the web interface needs to iterate over the input data and split it. Can this be done in JS?
from ftl.
Can this be done in JS?
Yes, but this will send multiple API requests (one for each domain) and FTL will reload the list after each request.
I was thinking if this should be done in FTL, to handle multi-domain inputs (from web interface or command line) in a single step and reload the lists only once.
from ftl.
API requests (one for each domain) and FTL will reload the list after each request
I see the issue here. Agree, this should be handled by FTL
from ftl.
#1629 adds handling in FTL. I'm currently developing away from my test environment and am not keen to break it from remote so this PR is - so far - entirely untested (you are welcomed to do this :-) ).
This will need a subsequent web change. Sending a space-separated domain seems a dirty hack. The PR above makes FTL accept either a string or an array of strings for domains, clients, group names and lists. The web interface will need to split the input itself and send a proper array to the API in this case.
from ftl.
Sending a space-separated domain seems a dirty hack.
I never said we should do that. I just said this is how it is done in v5.
OK, now the web interface will accept a domain or a list of domains separated by spaces (maybe we could also accept line breaks). The javascript code will need to split the "domain" field and send the result as an array.
from ftl.
This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.
from ftl.
Related Issues (20)
- FTLv6 restarts on `-RTMIN` instead of only reloading the lists HOT 4
- CNAME / A / AAAA Race Condition in FTL HOT 7
- pihole-FTL will not return SOA records if NXDOMAIN is cached for A records HOT 3
- FTL crashes: FATAL: verify_shmem_pid(): Failed to open shared memory object "FTL-settings": No such file or directory HOT 2
- Pi-hole forwarding requests for special-use domain home.arpa HOT 2
- v6 - Domain counts are shown, but no individual domains shown. HOT 3
- Errormessage in Dockercontainer on RaspberryPi HOT 3
- Latest v6 causes lag in database operation and CPU spikes HOT 11
- No queries in last 24h, but /stats report queries HOT 5
- Web interface not accessible after container restart until the lists in the background are downloaded
- API password in clear text in container log HOT 1
- Segmentation Fault after startup HOT 6
- Local DNS record with non-ASCII characters results in config parsing error. HOT 1
- Do not hard-code account name for 2FA
- pihole-ftl api (4711) all commands unknown HOT 2
- Changes to `webserver.port` should trigger a restart of the webserver
- TODO: Remove deprecated option dhcp.domain HOT 1
- Domain validation allows invalid characters HOT 3
- New groups don't get specified comment but always NULL
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ftl.