Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: bring back x-auth-checks with a length limit#19928

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
aslilac merged 1 commit intomainfromlilac/bring-back-x-authz-checks
Sep 24, 2025

Conversation

aslilac
Copy link
Member

We disabled it before because the header could get too long and cause problems. I've re-enabled it with a maximum length and a comment describing why the length matters. Any results that are truncated will be marked as such. It's not a perfect solution, but this is a useful debugging tool that I want to bring back.

Comment on lines +36 to +37
checks=checks[:maxHeaderLength]
checks+="<truncated>"
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Won't this result in a header that is 2011 bytes long, sincemaxHeaderLength +len("<truncated>")

Suggested change
checks=checks[:maxHeaderLength]
checks+="<truncated>"
truncationMarker="<truncated>"
checks=checks[:(maxHeaderLength-len(truncationMarker))]
checks+=truncationMarker

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I thought about that, but figured it wouldn't hurt to let it be a tiny bit longer 😄

@aslilacaslilac merged commita6fc28c intomainSep 24, 2025
33 checks passed
@aslilacaslilac deleted the lilac/bring-back-x-authz-checks branchSeptember 24, 2025 16:46

// This is defined separately in slim builds to avoid importing the rbac
// package, which is a large dependency.
funcSetAuthzCheckRecorderHeader(ctx context.Context,rw http.ResponseWriter) {
Copy link
Member

Choose a reason for hiding this comment

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

We could technically find the size of the other headers to, and check how large they are. Then make sure they never exceed 4kb

@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsSep 24, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@EmyrkEmyrkEmyrk left review comments

@ThomasK33ThomasK33ThomasK33 approved these changes

@EhabYEhabYAwaiting requested review from EhabY

Assignees

@aslilacaslilac

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@aslilac@ThomasK33@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp