You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "fuweng11 (via GitHub)" <gi...@apache.org> on 2024/01/25 02:34:13 UTC
[PR] [INLONG-9618][Manager] Fix the problem of httpUtils did not process 307 status code [inlong]
fuweng11 opened a new pull request, #9619:
URL: https://github.com/apache/inlong/pull/9619
### Prepare a Pull Request
- Fixes #9618
### Motivation
Fix the problem of httpUtils did not process 307 status code.
### Modifications
Fix the problem of httpUtils did not process 307 status code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [INLONG-9618][Manager] Fix the problem of httpUtils did not process 307 status code [inlong]
Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #9619:
URL: https://github.com/apache/inlong/pull/9619#discussion_r1469402967
##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/util/HttpUtils.java:
##########
@@ -88,7 +89,19 @@
if (!statusCode.is2xxSuccessful()) {
log.error("request error for {}, status code {}, body {}", url, statusCode, body);
}
-
+ if (HttpStatus.TEMPORARY_REDIRECT.equals(exchange.getStatusCode())) {
+ String redirectUrl = exchange.getHeaders().getFirst(HttpHeaders.LOCATION);
+ if (StringUtils.isNotBlank(redirectUrl)) {
+ exchange = restTemplate.exchange(redirectUrl, method, request, String.class);
Review Comment:
## Server-side request forgery
Potential server-side request forgery due to a [user-provided value](1).
[Show more details](https://github.com/apache/inlong/security/code-scanning/75)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [INLONG-9618][Manager] Fix the problem of httpUtils did not process 307 status code [inlong]
Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #9619:
URL: https://github.com/apache/inlong/pull/9619#discussion_r1465824212
##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/util/HttpUtils.java:
##########
@@ -88,7 +89,18 @@
if (!statusCode.is2xxSuccessful()) {
log.error("request error for {}, status code {}, body {}", url, statusCode, body);
}
-
+ if (HttpStatus.TEMPORARY_REDIRECT.equals(exchange.getStatusCode())
+ && CollectionUtils.isNotEmpty(exchange.getHeaders().get(HttpHeaders.LOCATION))) {
+ exchange = restTemplate.exchange(exchange.getHeaders().getFirst(HttpHeaders.LOCATION), method, request,
Review Comment:
## Server-side request forgery
Potential server-side request forgery due to a [user-provided value](1).
[Show more details](https://github.com/apache/inlong/security/code-scanning/72)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org