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

maxFormContentSize no longer set to -1 #625

Open
mawinter69 opened this issue Jun 12, 2024 · 0 comments
Open

maxFormContentSize no longer set to -1 #625

mawinter69 opened this issue Jun 12, 2024 · 0 comments
Labels

Comments

@mawinter69
Copy link

mawinter69 commented Jun 12, 2024

Jenkins and plugins versions report

Environment

version of maven-hpi-plugin 3.55

What Operating System are you using (both controller, and any agents involved in the problem)?

windows

Reproduction steps

  1. checkout role-strategy plugin sources and run with mvn hpi:run
  2. enable rolestrategy and configure an admin user
  3. create 100 item roles and assign 100 users via rest api (see shell script below)
  4. open the assign roles page (http://localhost:8080/jenkins/manage/role-strategy/assign-roles)
  5. save/apply the page
for i in $(seq 1 100);
do
  curl -X POST -i -u user:token http://localhost:8080/jenkins/role-strategy/strategy/addRole --data "type=projectRoles&roleName=role-$i&permissionIds=hudson.model.Item.Read&overwrite=true&pattern=test-$i"
  curl -X POST -i -u user:token http://localhost:8080/jenkins/role-strategy/strategy/assignUserRole --data "type=projectRoles&roleName=role-$i&user=user-$i"
done

Expected Results

the page is saved

Actual Results

saving fails with error

Anything else?

In the logs we can see

2024-06-12 22:33:39.593+0000 [id=1224]  WARNING h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID 01967e9d-2692-423c-9d3a-eb003afbc9db
java.lang.IllegalStateException: Form is larger than max length 200000
        at org.eclipse.jetty.server.Request.extractFormParameters(Request.java:593)
        at org.eclipse.jetty.server.Request.extractContentParameters(Request.java:546)
        at org.eclipse.jetty.server.Request.getParameters(Request.java:466)

In winstone change jenkinsci/winstone#95 the configuration was changed from setting a system property to calling the method setMaxFormContentSize from the jetty Context.

This change needs to be repeated here

Are you interested in contributing a fix?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant