[
https://issues.apache.org/jira/browse/FLINK-41713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated FLINK-41713:
-----------------------------------
Labels: pull-request-available (was: )
> Reject . and .. in log and profiler file name path parameters
> -------------------------------------------------------------
>
> Key: FLINK-41713
> URL: https://issues.apache.org/jira/browse/FLINK-41713
> Project: Flink
> Issue Type: Bug
> Components: Runtime / REST
> Reporter: Martijn Visser
> Priority: Minor
> Labels: pull-request-available
>
> Following FLINK-41694, the REST handlers that serve log and profiler files
> have the same gap for {{.}} and {{..}}. JobManagerCustomLogHandler,
> JobManagerProfilingFileHandler and
> TaskExecutor#requestFileUploadByNameAndType strip path information with {{new
> File(name).getName()}}, which keeps {{.}} and {{..}}. A request such as {{GET
> /jobmanager/logs/..}}, {{/jobmanager/profiler/..}} or
> {{/taskmanagers/<id>/logs/..}} (also as {{%2e%2e}}, {{%252e%252e}} or
> {{%252F}}) then points at the directory or its parent and fails with HTTP 500
> and a stack trace. No file outside the directory is read, since opening a
> directory fails.
> We should reject empty names, {{.}} and {{..}} in LogFileNamePathParameter
> and ProfilingFileNamePathParameter, as FLINK-41694 does for
> JarIdPathParameter, so these requests return 400.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)