Question - Query Lists

Hello everyone

Once again I have a question.
When I search the domain cdn.jsdelivr.net in the web interface of Pi-hole using Query Lists, I will not see any search results. Neither “Search partial match” nor “Search exact match”.


For all other domains I have entered, if there are no hits, “No results found for xxxxxx” will be displayed. "

A query with

pihole -q -exact -adlist cdn.jsdelivr.net

works and tells me that this domain is not in any blocklist.

grafik

What could that be?

Speedy70

Do you see any errors on the Developer Tools of your browser?
(Try F12 to open them)

@DL6ER

Unfortunately, I can not test right now. Currently have no electricity after a thunderstorm! :zap:
Will test it tomorrow evening and post the result here.
thanxxxxx …

Speedy70

No need to rush, we will be here.

@DL6ER

Have electricity on the sockets again :slight_smile:

Now for the test.
I tried using the developer tools to get the error on the track. But unfortunately, nothing is noticeable. I also tried to detect a bug by debugger. But here I lack the necessary experience to determine any mistake.

Anyway, it is like that now.
A search for cdn.jsdelivr.net by means of “Search partial match” continues to yield no result.
A search using “Search exact match” returns the correct indication “[i] No exact results found for cdn.jsdelivr.net within the block lists

Annotation:
It suffices if I change only 1 character in the domain cdn.jsdelivr.net to cdn.jsdelxivr.net then the search works without errors using “Search partial match”. :thinking:

Speedey70

Never mind, I had a typo in my first test of this issue and I can confirm what you’re seeing now. I’ll come back to you when I found what is going wrong.

1 Like

You may be seeing something from https://github.com/pi-hole/pi-hole/pull/2891

That fix is in the bugfix release that we have set up.

1 Like

@DL6ER
@DanSchaper

Ok thank you! :+1:

Thanks for the heads-up. I checked out release/v4.3.2 and can still confirm the issue, what do you see when querying

pihole -q cdn.jsdelivr.net
pihole -q cdn.jsdelivr.nett

The first one does not provide any output for me, even on the release branch.

@DanSchaper

This is the reason:

That doesn’t sound right.

If you look here, you’ll see that the “no matches” case is handled before we remove comments from ${results} and before that line.

I modified the code to

echo "wb -${wbMatch:-}-"
echo "wc -${wcMatch:-}-"
echo "res -${results[*]}-"
if [[ -z "${wbMatch:-}" ]] && [[ -z "${wcMatch:-}" ]] && [[ -z "${results[*]}" ]]; then
    echo -e "  ${INFO} No ${exact/t/t }results found for ${COL_BOLD}${domainQuery}${COL_NC} within the block lists"
    exit 0

to highlight what is happening here. See the generated output:

$ pihole -q cdn.jsdelivr.net
wb --
wc --
res -list.0.raw.githubusercontent.com.domains:# 0.0.0.0 cdn.jsdelivr.net #[affects spireenergy.com]-

This line I mentioned needs to be fixed.

I don’t know why that line is there, I’ll admit its purpose is not clear to me, but the correct fix is to move L160-171 # Handle notices below L186, but before the line you posted. There is no code after the line you mentioned to handle a result-not-found so fixing it won’t do anything.

EDIT 1 billion: To be clear, I have made changes to query.sh in 4.3.2 to fix issues with how we handle comments so master and 4.3.2 might be broken for different reasons. I am talking about the 4.3.2 version of query.sh.