-
-
Notifications
You must be signed in to change notification settings - Fork 569
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
Replace MAX_BYTE_SIZE constant with setting #601
Replace MAX_BYTE_SIZE constant with setting #601
Conversation
@dblessing would you mind doing the initial review on this whenever you have some time? P.S. I wasn't able to get the tests to run because of dependency problems on my machine. If you could confirm you're seeing green on the tests that would be excellent. |
@gitlab-djensen Thanks for opening the PR. Looks good to me, with my limited knowledge of the |
👍 looks good to merge |
@pitbulk friendly ping, hopefully this is an easy review 🙂 |
@pitbulk thanks for reviewing! I just marked both of your comments as resolved. Should we run the workflow next? (It's telling me "First-time contributors need a maintainer to approve running workflows.") |
Strangely, the workflow ran anyway. There were a bunch of failures because |
We need to avoid breaking changes. If settings is not provided to the decode_raw_saml method, makes sense to keep using the default value, otherwise, the settings object should be there. I don't want to force settings parameters on main constructors. |
5d3b53e
to
ce6d391
Compare
ce6d391
to
e5e8327
Compare
The MAX_BYTE_SIZE constant did not allow for customization, which is necessary for cases where legitimate SAML responses are larger than 250,000 bytes. This replaces the constant with a setting, which has a default value of 250,000 bytes, but can be customized like any other setting.
e5e8327
to
b6fa044
Compare
@pitbulk gotcha, refactored to be non-breaking (by calling |
@pitbulk this looks good to me. |
@pitbulk friendly ping, prompted by a colleague with an affected client. Does this look good for merge? |
Also, after merge, let's get an gem release please :) Lots of great improvements recently. |
Sorry I will be back from PTO on 6 and take care of all the pending PRs |
Status
READY
Migrations
NO
Description
The MAX_BYTE_SIZE constant did not allow for customization, which
is necessary for cases where legitimate SAML responses are larger
than 250,000 bytes. This replaces the constant with a setting, which
has a default value of 250,000 bytes, but can be customized like
any other setting.
This was motivated by #598, which was motivated by https://gitlab.com/gitlab-org/gitlab/-/issues/329053.
This follows the existing pattern used for
encode_raw_saml
.Related PRs
List related PRs against other branches:
Todos
Deploy Notes
Nothing noteworthy.
Steps to Test or Reproduce
Outline the steps to test or reproduce the PR here.
git fetch git checkout gitlab-djensen:gitlab-djensen-use-setting-for-max-byte-size bundle install; ruby -Itest test/settings_test.rb
Impacted Areas in Application
List general components of the application that this PR will affect: