Details
-
Bug
-
Resolution: Invalid
-
Low
-
None
-
8.4.1
-
None
-
8.04
-
Severity 3 - Minor
-
Description
Issue Summary
This is reproducible in Data Center: Yes
Steps to Reproduce
- Create a space/site export from any confluence version, to import it to Confluence 8.4.1
- Place the space export in <confluence-home>/shared/restore/space (or) site export in - <confluence-home>/shared/restore/site
- Use cURL -
cURL -D- -u <user_name>:<password> -X POST -H "X-Atlassian-Token: nocheck" -F "file=@<xmlexport-******.zip" http://<base_url>/rest/api/backup-restore/restore/space/upload
Expected Results
- Site/Space should be imported into the destination Confluence
Actual Results
<*****> % curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@xmlexport-20230816-063851-1.zip" http://localhost:6841/c841/rest/api/backup-restore/restore/site/upload HTTP/1.1 400 Set-Cookie: JSESSIONID=8EEECFC449F47FD0F41A461034E4818A; Path=/c841; HttpOnly X-Seraph-LoginReason: OK X-AUSERNAME: admin Cache-Control: no-store Expires: Thu, 01 Jan 1970 00:00:00 GMT X-Content-Type-Options: nosniff Content-Type: application/json Transfer-Encoding: chunked Date: Thu, 17 Aug 2023 01:30:11 GMT Connection: close {"statusCode":400,"data":{"authorized":false,"valid":true,"allowedInReadOnlyMode":true,"errors":[],"successful":false},"message":"The uploaded file should be a valid zip file.","reason":"Bad Request"}%
The below exception is thrown in the atlassian-confluence.log file:
2023-08-17 07:00:11,601 WARN [http-nio-6841-exec-3] [common.security.jersey.XsrfResourceFilter] hasDeprecatedHeaderValue Use of the 'nocheck' value for X-Atlassian-Token has been deprecated since rest 3.0.0. Please use a value of 'no-check' instead. -- url: /c841/rest/api/backup-restore/restore/site/upload | userName: admin | traceId: 39bae9a7bc43f318 2023-08-17 07:00:11,610 WARN [http-nio-6841-exec-3] [common.security.jersey.XsrfResourceFilter] hasDeprecatedHeaderValue Use of the 'nocheck' value for X-Atlassian-Token has been deprecated since rest 3.0.0. Please use a value of 'no-check' instead. -- url: /c841/rest/api/backup-restore/restore/site/upload | userName: admin | traceId: 39bae9a7bc43f318
From conf_access_*.log
[17/Aug/2023:07:07:34 +0530] admin http-nio-6841-exec-3 127.0.0.1 POST /c841/rest/api/backup-restore/restore/site/upload HTTP/1.1 400 143ms 211 - curl/8.1.2
Workaround
curl -kv -u <user_name>:<password> -X POST -H 'Content-Type: application/json' -d '{"fileName":"xmlexport-20230816-063851-1.zip","skipReindex":"true"}' "http://<base_url>/rest/api/backup-restore/restore/space"