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

Blocking some user agents? #17042

Closed
1 task done
dopplershift opened this issue Apr 13, 2022 · 8 comments
Closed
1 task done

Blocking some user agents? #17042

dopplershift opened this issue Apr 13, 2022 · 8 comments
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team engineering Will involve Docs Engineering needs SME This proposal needs review from a subject matter expert waiting for review Issue/PR is waiting for a writer's review

Comments

@dopplershift
Copy link

Code of Conduct

What article on docs.github.com is affected?

I know for sure:

I suspect others are impacted. For the pages I've tested, both Sphinx's link checker and even cURL are getting 403's by default when trying to access the page:

curl --head https://docs.github.com/en/actions

gives

HTTP/2 403 
x-azure-ref: 0GhdWYgAAAADzwxBhE8RiQLHcCy8WV92AU0pDRURHRTAzMTcANTk2ZDc4YTItY2E1Zi00NzlkLWJjZGMtMDgzNTgzMzE3NGIy
accept-ranges: bytes
date: Wed, 13 Apr 2022 00:19:38 GMT
via: 1.1 varnish
x-served-by: cache-den8270-DEN
x-cache: MISS
x-cache-hits: 0
x-timer: S1649809178.110803,VS0,VE117
strict-transport-security: max-age=31557600

The only way I can get it to work is by giving it a full realistic looking user agent (a partial one doesn't even do it):

curl -A "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:24.0) Gecko/20100101 Firefox/24.0" --head https://docs.github.com/en/actions

which gives the expected:

HTTP/2 200 
cache-control: private, no-store
content-type: text/html; charset=utf-8
etag: "45865-2BLz46zqCXLjEdY4gPLZxAVqnWY"
set-cookie: _csrf=ZIvPK-0aEwEb2w8LVBDtYmF9; Path=/; HttpOnly; Secure; SameSite=Lax
access-control-allow-origin: *
content-security-policy: default-src 'none';prefetch-src 'self';connect-src 'self';font-src 'self' data: githubdocs.azureedge.net;img-src 'self' data: github.githubassets.com githubdocs.azureedge.net placehold.it *.githubusercontent.com github.com;object-src 'self';script-src 'self';frame-src https://graphql.github.com/ https://www.youtube-nocookie.com;style-src 'self' 'unsafe-inline';child-src 'self'
x-dns-prefetch-control: off
expect-ct: max-age=0
x-frame-options: SAMEORIGIN
x-download-options: noopen
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
x-xss-protection: 0
x-powered-by: Next.js
x-azure-ref: 0xBdWYgAAAABsIRkj3IKZTZjiq20jFYjRU0pDRURHRTA1MDYANTk2ZDc4YTItY2E1Zi00NzlkLWJjZGMtMDgzNTgzMzE3NGIy
accept-ranges: bytes
date: Wed, 13 Apr 2022 00:22:28 GMT
via: 1.1 varnish
x-served-by: cache-den8225-DEN
x-cache: CONFIG_NOCACHE, MISS
x-cache-hits: 0
x-timer: S1649809349.623786,VS0,VE312
vary: Accept-Encoding
strict-transport-security: max-age=31557600
content-length: 284773

What changes are you suggesting?

I'm not sure if this is intentional or not, but it's keeping me from validating links in my documentation when running even on GitHub Actions.

Additional information

No response

@dopplershift dopplershift added the content This issue or pull request belongs to the Docs Content team label Apr 13, 2022
@welcome
Copy link

welcome bot commented Apr 13, 2022

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Apr 13, 2022
@Kieudung717

This comment was marked as spam.

@ramyaparimi ramyaparimi added actions This issue or pull request should be reviewed by the docs actions team waiting for review Issue/PR is waiting for a writer's review needs SME This proposal needs review from a subject matter expert and removed triage Do not begin working on this issue until triaged by the team labels Apr 13, 2022
@github-actions
Copy link
Contributor

Thanks for opening an issue! We've triaged this issue for technical review by a subject matter expert 👀

@dmke
Copy link

dmke commented Apr 13, 2022

Can confirm, this looks like an incomplete(1) regular expression:

UA string works(2)
Mozilla/0 Gecko/00000000 Firefox/0 yes
Mozilla/5.0 (compatible; rv:100.0) Gecko/20380120 Firefox/100.0 no

Please note that the same request blocking also makes the contact form (https://support.github.com/contact/bug-report) unusable:

image

image


(1) Can any such list be ever complete?

(2) curl --fail -IA $UA_STRING https://docs.github.com

@dopplershift
Copy link
Author

I'm also not sure what the point of blocking based on user-agents even would be, given that it's a client-supplied header that's readily overridden.

@WILLIAMJOESPHBAUGHMANJR

This comment was marked as spam.

@felicitymay
Copy link
Contributor

Thanks for flagging this problem. I'm going to ask our engineering team to take a look.

@felicitymay felicitymay added the engineering Will involve Docs Engineering label Apr 22, 2022
@janiceilene
Copy link
Contributor

@dopplershift Thanks so much for opening an issue to let us know what you're seeing and I'm sorry you're seeing issues with the docs site! I've opened an internal issue for the team to look at so I'm going to close this now 💛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team engineering Will involve Docs Engineering needs SME This proposal needs review from a subject matter expert waiting for review Issue/PR is waiting for a writer's review
Projects
None yet
Development

No branches or pull requests

8 participants
@dopplershift @dmke @felicitymay @janiceilene @ramyaparimi @Kieudung717 @WILLIAMJOESPHBAUGHMANJR and others