Play apps with a bundled start script split JAVA_OPTS unquoted, breaking multi-word values
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 42/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Área
- cloud, devops, infrastructure
Línea de trabajo
This is the start-script launch path for Play apps (bin/<name> from sbt-native-packager), not the buildpack javaexec path used when no start script exists. Trace how JAVA_OPTS is passed into that script versus the no-start-script branch (play.core.server.NettyServer). Done means multi-word JAVA_OPTS (e.g. a quoted cron -D) survive as tokens, likely via -J<flag> as the issue suggests, without relying on unquoted ${java_opts[@]}. Related context is cloudfoundry/java-buildpack#1435.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Play apps packaged with a start script (bin/<name>, generated by sbt-native-packager, used whenever the app ships one — staged and dist Play 2.x builds) are launched directly via that script, not via the buildpack's shell-free javaexec launcher. javaexec is only used when no start script is present.
sbt-native-packager's own script template does:
if [[ "$JAVA_OPTS" != "" ]]; then
java_opts="${JAVA_OPTS}"
fi
execRunner "$java_cmd" ${java_opts[@]} ...
${java_opts[@]} is unquoted, so $JAVA_OPTS is word-split on whitespace (and glob-expanded). A value containing embedded spaces, e.g. a quoted cron expression (-DcronExpr="0 */7 * * * *"), splits into separate bare words; a bare word like */7 with no leading - can be misread as the main class by java, causing Could not find or load main class *.7 and a crash loop.
Command substitution in the value cannot occur here (it's plain variable expansion, not re-parsed source) — this is a launch-correctness issue, pre-existing and independent of #1432/#1435's javaexec fix, which only covers the no-start-script branch (play.core.server.NettyServer invocation).
Possible fix: route the start-script branch through a safe tokenizer too, passing JAVA_OPTS tokens as -J<flag> arguments (the convention sbt-native-packager scripts already support for exactly this purpose) instead of relying on the script reading $JAVA_OPTS directly.
Found while investigating cloudfoundry/java-buildpack#1435.
- Lenguaje dominante
- Go
- Estrellas
- 452
- Forks
- 2.5k
- Merge medio
- 1 d 2 h
- PR fusionados (30 d)
- 23
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de cloudfoundry/java-buildpack
-
v5.1.0 GA release planAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
cloudfoundry/java-buildpack#1423 ·
Los mantenedores suelen responder en 1 día
-
Support configurable initial/minimum heap size relative to (/as a percentage of) calculated XmxAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
cloudfoundry/java-buildpack#1377 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
cloudfoundry/java-buildpack#1364 ·
Los mantenedores suelen responder en 1 día
-
elastic-otel-java supportAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
cloudfoundry/java-buildpack#1342 · 1 comentario · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
cloudfoundry/java-buildpack#1151 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de cloudfoundry/java-buildpack
Issues similares
-
kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 4 días
-
bug needs-acceptance
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
vllm-project/semantic-router#4744 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
jaegertracing/jaeger#9794 ·
Los mantenedores suelen responder en 1 día
-
ScalingModifiers formula fails with "formula returned non-float result" when expression evaluates to an integerPosiblemente ocupada @Sarthak-Pandey la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
kedacore/keda#8270 · 1 comentario ·
Los mantenedores suelen responder en 1 día