stable
Clone or download
Protection that has been put in place in for request #27502 is not enough in the context of project creation via archive upload. Since the archive is not extracted to the filesystem in this situation, there is no reconnection. Accessing the `project.xml` is done directly by asking the file via `\ZipArchive::getFromName`. We don't know if we can trust the FS to retrieve the file content. Furthermore, if the file content is big enough, the parsing to `SimpleXMLElement` might take some time. Therefore we take here a belt and braces approach: a reconnection is done as soon as we parsed the content (in addition to the reconnection done after extracting the archive in cli project import). No functional changes, the import should still succeed. part of story #36484 create a new project from an XML template Change-Id: If321c3635d58cbab6e917caeb5b6fe7968b9a65f
Modified Files
Name | ||||
---|---|---|---|---|
M | src/common/DB/DBConnection.php | +1 | −7 | Go to diff View file |
A | src/common/DB/ReconnectAfterALongRunningProcess.php | +32 | −0 | Go to diff View file |
M | src/common/Project/ProjectXMLImporter.class.php | +9 | −1 | Go to diff View file |
M | tests/unit/common/Project/ProjectXMLImporterTest.php | +3 | −1 | Go to diff View file |