mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Use 404 code when rejecting invalid project id
This commit is contained in:
parent
76b349591c
commit
ac4f4082c8
2 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue