Skip to content

fix: improve socket validation - #9860

Open
Rello wants to merge 5 commits into
masterfrom
Rello-patch-1
Open

Rello wants to merge 5 commits into
masterfrom
Rello-patch-1

fix(leaveShare): do not interact with user in automated tests

39499e4
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Jul 20, 2026 in 31m 20s

Quality Gate failed

Failed conditions
25.0% Coverage on New Code (required ≥ 80%)
D Maintainability Rating on New Code (required ≥ A)
85 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 860 in src/gui/socketapi/socketapi.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make the type of this parameter a pointer-to-const. The current type of "listener" is "class OCC::SocketListener *".

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

Check warning on line 864 in src/gui/socketapi/socketapi.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "fileData" of type "struct OCC::SocketApi::FileData" should be const-qualified.

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

Check warning on line 111 in src/gui/folderman.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make the type of this parameter a pointer-to-const. The current type of "f" is "class OCC::Folder *".

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

Check warning on line 1366 in src/gui/socketapi/socketapi.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make the type of this parameter a pointer-to-const. The current type of "syncFolder" is "class OCC::Folder *const".

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

Check warning on line 748 in src/gui/folderman.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "folder" of type "class OCC::Folder *" should be const-qualified.

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

Check warning on line 39 in src/gui/folderman.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=AZ9_oholq8KGHlRqShHn&open=AZ9_oholq8KGHlRqShHn&pullRequest=9860

Check warning on line 651 in src/gui/socketapi/socketapi.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "job" of type "class OCC::EncryptFolderJob *" should be const-qualified.

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

Check warning on line 1298 in src/gui/socketapi/socketapi.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "listener" of type "class OCC::SocketListener *" should be const-qualified.

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

Check warning on line 1049 in src/gui/folderman.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "f" of type "class OCC::Folder *" should be const-qualified.

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

Check warning on line 1430 in src/gui/folderman.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check warning on line 560 in src/gui/socketapi/socketapi.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "folder" of type "class OCC::Folder *" should be const-qualified.

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

Check warning on line 570 in src/gui/folderman.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "accountState" of type "class OCC::AccountState *" should be const-qualified.

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

Check warning on line 1255 in src/gui/socketapi/socketapi.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "strings" of type "struct std::array<struct std::pair<const char *, class QString>, 7>" should be const-qualified.

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

Check warning on line 1298 in src/gui/socketapi/socketapi.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make the type of this parameter a pointer-to-const. The current type of "listener" is "class OCC::SocketListener *".

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

Check warning on line 230 in src/gui/folderman.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

implicit conversion loses integer precision: 'size_type' (aka 'long long') to 'int'

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

Check warning on line 1106 in src/gui/socketapi/socketapi.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Avoid this unnecessary copy by using a "const" reference.

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

Check warning on line 1500 in src/gui/folderman.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check warning on line 2173 in src/gui/folderman.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=AZ9_ohjzq8KGHlRqShHh&open=AZ9_ohjzq8KGHlRqShHh&pullRequest=9860

Check warning on line 1765 in src/gui/folderman.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "status" of type "enum OCC::SyncResult::Status *" should be const-qualified.

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

Check warning on line 2177 in src/gui/folderman.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unmodified variable "folder" of type "class OCC::Folder *" should be const-qualified.

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

Check warning on line 561 in src/gui/socketapi/socketapi.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check warning on line 1298 in src/gui/socketapi/socketapi.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=AZ9_ohYIq8KGHlRqShGv&open=AZ9_ohYIq8KGHlRqShGv&pullRequest=9860

Check warning on line 1090 in src/gui/folderman.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

This function should be declared "const".

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

Check warning on line 570 in src/gui/socketapi/socketapi.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make the type of this parameter a pointer-to-const. The current type of "f" is "class OCC::Folder *".

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

Check warning on line 1383 in src/gui/socketapi/socketapi.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=AZ9_ohYIq8KGHlRqShG1&open=AZ9_ohYIq8KGHlRqShG1&pullRequest=9860