mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-27 02:51:57 +02:00
Use 404 code when rejecting invalid project id
This commit is contained in:
@@ -72,7 +72,7 @@ public class Oauth2Filter implements Filter {
|
||||
String requestUri = ((Request) servletRequest).getRequestURI();
|
||||
if (requestUri.startsWith("/project")) {
|
||||
Log.info("[{}] Invalid request URI", requestUri);
|
||||
sendResponse(servletResponse,400, Arrays.asList(
|
||||
sendResponse(servletResponse,404, Arrays.asList(
|
||||
"Invalid Project ID (must not have a '/project' prefix)"
|
||||
));
|
||||
return;
|
||||
|
||||
@@ -885,7 +885,7 @@ public class WLGitBridgeIntegrationTest {
|
||||
assertEquals(Arrays.asList(
|
||||
"Cloning into '1234abcd'...",
|
||||
"remote: Invalid Project ID (must not have a '/project' prefix)",
|
||||
"fatal: unable to access 'http://127.0.0.1:33886/project/1234abcd/': The requested URL returned error: 400"
|
||||
"fatal: repository 'http://127.0.0.1:33886/project/1234abcd/' not found"
|
||||
), actual);
|
||||
|
||||
wlgb.stop();
|
||||
|
||||
Reference in New Issue
Block a user