hotfix 2.6.1 (#875)

This commit is contained in:
Miguel Serrano 2021-04-21 13:13:47 +02:00 committed by GitHub
parent 0c8d1a1e8c
commit 20c3d7ae71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

5
hotfix/2.6.1/Dockerfile Normal file
View file

@ -0,0 +1,5 @@
FROM sharelatex/sharelatex:2.6.0-RC1
# Patch: fixes Project restore inserts bad projectId into deletedFiles
COPY document-deleter-object-id.patch ${baseDir}
RUN cd ${baseDir} && patch -p0 < document-deleter-object-id.patch

View file

@ -0,0 +1,10 @@
--- /var/www/sharelatex/web/app/src/Features/Project/ProjectDeleter.js
+++ /var/www/sharelatex/web/app/src/Features/Project/ProjectDeleter.js
@@ -278,6 +278,7 @@ async function deleteProject(projectId, options = {}) {
}
async function undeleteProject(projectId, options = {}) {
+ projectId = ObjectId(projectId)
let deletedProject = await DeletedProject.findOne({
'deleterData.deletedProjectId': projectId
}).exec()