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

cask/audit: Pass a URL's referer through to cURL #14991

Merged
merged 1 commit into from Mar 17, 2023

Conversation

issyl0
Copy link
Member

@issyl0 issyl0 commented Mar 16, 2023

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

TODO:

  • The rest of the PR checklist.
  • Add some tests.
  • Test audits with casks without referer URL parts.

Before:

❯ brew audit --cask --online --appcast --signing 'ithoughtsx'
[...]
audit for ithoughtsx: failed
 - The binary URL https://cdn.toketaware.com?download=iThoughtsX.zip is not reachable (HTTP status code 404)
 - Version '9.2.0' differs from '9.3.0' retrieved by livecheck.
 - Version '9.2.0' differs from '9.3.0' retrieved by livecheck.
Error: 2 problems in 1 cask detected

After:

❯ brew audit --cask --online --appcast --signing 'ithoughtsx'
[...]
audit for ithoughtsx: failed
 - Version '9.2.0' differs from '9.3.0' retrieved by livecheck.
 - Version '9.2.0' differs from '9.3.0' retrieved by livecheck.
Error: 1 problem in 1 cask detected

@BrewTestBot
Copy link
Member

Review period will end on 2023-03-17 at 00:36:54 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Mar 16, 2023
- Some casks have URL arguments like "referer" (spelled wrong, that's
  intentional in the HTTP spec).
- The audit for one such cask, `iThoughtsX`, was failing because the
  "referer" wasn't getting passed through to cURL so the access would
  404.

----

Before:

```
❯ brew audit --cask --online --appcast --signing 'ithoughtsx'
[...]
audit for ithoughtsx: failed
 - The binary URL https://cdn.toketaware.com?download=iThoughtsX.zip is not reachable (HTTP status code 404)
 - Version '9.2.0' differs from '9.3.0' retrieved by livecheck.
 - Version '9.2.0' differs from '9.3.0' retrieved by livecheck.
Error: 2 problems in 1 cask detected
```

After:

```
❯ brew audit --cask --online --appcast --signing 'ithoughtsx'
[...]
audit for ithoughtsx: failed
 - Version '9.2.0' differs from '9.3.0' retrieved by livecheck.
 - Version '9.2.0' differs from '9.3.0' retrieved by livecheck.
Error: 1 problem in 1 cask detected
```
@issyl0 issyl0 force-pushed the cask-url-audit-pass-referrer branch from 6d015ba to 0701ea4 Compare March 16, 2023 23:30
@issyl0 issyl0 marked this pull request as ready for review March 16, 2023 23:35
@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Mar 17, 2023
@BrewTestBot
Copy link
Member

Review period ended.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Great work, thanks again @issyl0!

@MikeMcQuaid MikeMcQuaid merged commit b8743d3 into Homebrew:master Mar 17, 2023
22 of 23 checks passed
@issyl0 issyl0 deleted the cask-url-audit-pass-referrer branch March 17, 2023 20:33
@github-actions github-actions bot added the outdated PR was locked due to age label Apr 17, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

audit: cask curl_http_content_headers_and_checksum audit not passing arguments (referer)
3 participants