Skip to content

fix(UI): validate E2EE file names#10238

Open
Rello wants to merge 5 commits into
masterfrom
bugfix/E2eeFolder
Open

fix(UI): validate E2EE file names#10238
Rello wants to merge 5 commits into
masterfrom
bugfix/E2eeFolder

Add checks for '.' and '..' in filename validation

b05f17b
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Jun 25, 2026 in 22m 44s

Quality Gate failed

Failed conditions
47.5% Coverage on New Code (required ≥ 80%)
D Maintainability Rating on New Code (required ≥ A)
65 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Annotations

Check warning on line 1203 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace the redundant type with "auto".

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3iE&open=AZ7_FsAliYrk9yL2a3iE&pullRequest=10238

Check warning on line 1006 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this "const" qualifier from the return type in all declarations.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3h9&open=AZ7_FsAliYrk9yL2a3h9&pullRequest=10238

Check warning on line 27 in src/libsync/foldermetadata.h

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Class has 60 methods, which is greater than the 35 authorized. Split it into smaller classes.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsDziYrk9yL2a3iK&open=AZ7_FsDziYrk9yL2a3iK&pullRequest=10238

Check warning on line 100 in src/libsync/foldermetadata.h

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Edit this comment to use the C++ format, i.e. "//".

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsDziYrk9yL2a3iI&open=AZ7_FsDziYrk9yL2a3iI&pullRequest=10238

Check warning on line 321 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the init-statement to declare "metadataKeyFromJson" inside the if statement.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3hk&open=AZ7_FsAliYrk9yL2a3hk&pullRequest=10238

Check warning on line 1101 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Modify the macro definition so that it needs to be followed by a semicolon, or remove this empty statement.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3iB&open=AZ7_FsAliYrk9yL2a3iB&pullRequest=10238

Check warning on line 536 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace with the version of "std::ranges::sort" that takes a range.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3hq&open=AZ7_FsAliYrk9yL2a3hq&pullRequest=10238

Check warning on line 680 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "end" of type "class QList<struct OCC::FolderMetadata::EncryptedFile>::const_iterator" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3hv&open=AZ7_FsAliYrk9yL2a3hv&pullRequest=10238

Check warning on line 186 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Complete the task associated to this "TODO" comment.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3hZ&open=AZ7_FsAliYrk9yL2a3hZ&pullRequest=10238

Check failure on line 647 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 36 to the 25 allowed.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3ht&open=AZ7_FsAliYrk9yL2a3ht&pullRequest=10238

Check warning on line 256 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Complete the task associated to this "TODO" comment.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3ha&open=AZ7_FsAliYrk9yL2a3ha&pullRequest=10238

Check warning on line 79 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "account" of type "class QSharedPointer<class OCC::Account>" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3hc&open=AZ7_FsAliYrk9yL2a3hc&pullRequest=10238

Check warning on line 812 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "end" of type "class QJsonObject::const_iterator" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3h0&open=AZ7_FsAliYrk9yL2a3h0&pullRequest=10238

Check warning on line 5 in src/libsync/foldermetadata.h

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Edit this comment to use the C++ format, i.e. "//".

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsDziYrk9yL2a3iH&open=AZ7_FsDziYrk9yL2a3iH&pullRequest=10238

Check warning on line 1099 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "statusCode" of type "int" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3iA&open=AZ7_FsAliYrk9yL2a3iA&pullRequest=10238

Check warning on line 186 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Edit this comment to use the C++ format, i.e. "//".

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3hY&open=AZ7_FsAliYrk9yL2a3hY&pullRequest=10238

Check warning on line 679 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define each identifier in a dedicated statement.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3hu&open=AZ7_FsAliYrk9yL2a3hu&pullRequest=10238

Check warning on line 605 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this "const" qualifier from the return type in all declarations.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3hs&open=AZ7_FsAliYrk9yL2a3hs&pullRequest=10238

Check warning on line 93 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "folderType" of type "enum OCC::FolderMetadata::FolderType" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3hf&open=AZ7_FsAliYrk9yL2a3hf&pullRequest=10238

Check warning on line 147 in src/libsync/foldermetadata.h

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this identifier to be shorter or equal to 31 characters.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsDziYrk9yL2a3iN&open=AZ7_FsDziYrk9yL2a3iN&pullRequest=10238

Check warning on line 697 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "end" of type "class QSet<class QByteArray>::const_iterator" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3hx&open=AZ7_FsAliYrk9yL2a3hx&pullRequest=10238

Check warning on line 927 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this identifier to be shorter or equal to 31 characters.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3h5&open=AZ7_FsAliYrk9yL2a3h5&pullRequest=10238

Check warning on line 88 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "account" of type "class QSharedPointer<class OCC::Account>" should be const-qualified.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3he&open=AZ7_FsAliYrk9yL2a3he&pullRequest=10238

Check warning on line 840 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this identifier to be shorter or equal to 31 characters.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3h2&open=AZ7_FsAliYrk9yL2a3h2&pullRequest=10238

Check failure on line 877 in src/libsync/foldermetadata.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this code to not nest more than 3 if|for|do|while|switch statements.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ7_FsAliYrk9yL2a3h4&open=AZ7_FsAliYrk9yL2a3h4&pullRequest=10238