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

Use the 'Location:' header only for latest FTL tag API check. #3987

Merged
merged 1 commit into from
Jan 13, 2021

Conversation

dschaper
Copy link
Member

By submitting this pull request, I confirm the following:
please fill any appropriate checkboxes, e.g: [X]

  • I have read and understood the contributors guide, as well as this entire template.
  • I have made only one major change in my proposed changes.
  • I have commented my proposed changes within the code.
  • I have tested my proposed changes, and have included unit tests where possible.
  • I am willing to help maintain this change if there are issues with it later.
  • I give this submission freely and claim no ownership.
  • It is compatible with the EUPL 1.2 license
  • I have squashed any insignificant commits. (git rebase)

What does this PR aim to accomplish?:

Fixes #3986

GitHub API headers now have CSP with the work "location" in the policy. FTL tags came back with that location as the tag.

dan@raspberrypi:~ $ curl -sI https://github.com/pi-hole/FTL/releases/latest | grep --color=never -i Location | awk -F / '{print $NF}' | tr -d '[:cntrl:]'
v5.3.4socket-worker-5029ae85.jsd

How does this PR accomplish the above?:

Only use Locaition: which should only grab the proper header.

dan@raspberrypi:~ $ curl -sI https://github.com/pi-hole/FTL/releases/latest | grep --color=never -i Location: | awk -F / '{print $NF}' | tr -d '[:cntrl:]'
v5.3.4

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
@dschaper dschaper added PR: Code Review Required Open Pull Request, needs code reviewd PR: Approval Required Open Pull Request, needs approval labels Jan 12, 2021
@dschaper dschaper added this to the v5.2.3 milestone Jan 12, 2021
@dschaper dschaper linked an issue Jan 12, 2021 that may be closed by this pull request
@pralor-bot
Copy link

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

https://discourse.pi-hole.net/t/pi-hole-update-wird-nicht-installiert/42862/11

@pralor-bot
Copy link

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

https://discourse.pi-hole.net/t/ftl-keeps-updating-to-same-version/42898/2

@ArrowNemesis
Copy link

Hi dschaper, which code do I use, I'm bit confuse about the codes look too complex. pls help afap thank you.

@ArrowNemesis
Copy link

Has this issue been fixed yet?

Copy link

@ArrowNemesis ArrowNemesis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does red and green colour indicate?

@pralor-bot
Copy link

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

https://discourse.pi-hole.net/t/pihole-c-causes-pihole-ftl-log-errors-ftl-v5-3-4/42154/28

@pi-hole pi-hole locked as off-topic and limited conversation to collaborators Jan 13, 2021
@dschaper dschaper added PR: Approved Open Pull Request, Approved by required number of reviewers and removed PR: Approval Required Open Pull Request, needs approval labels Jan 13, 2021
@dschaper dschaper merged commit 020b6b8 into development Jan 13, 2021
@dschaper dschaper deleted the fix/GitHubAPI branch January 13, 2021 17:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
PR: Approved Open Pull Request, Approved by required number of reviewers PR: Code Review Required Open Pull Request, needs code reviewd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pihole -up > do update FTL from 5.3.4 to 5.3.4
5 participants