Skip to content

fix: improve socket validation#9860

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

fix: improve socket validation#9860
Rello wants to merge 5 commits into
masterfrom
Rello-patch-1

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

49c4bb4
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Apr 23, 2026 in 50m 11s

Quality Gate failed

Failed conditions
25.0% Coverage on New Code (required ≥ 80%)
D Maintainability Rating on New Code (required ≥ A)
76 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 1496 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=AZ253sAclyTdSDttC8i1&open=AZ253sAclyTdSDttC8i1&pullRequest=9860

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

Check warning on line 1276 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=AZ2bMYISg--gWPrDHh9z&open=AZ2bMYISg--gWPrDHh9z&pullRequest=9860

Check warning on line 2272 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=AZ253sAclyTdSDttC8jP&open=AZ253sAclyTdSDttC8jP&pullRequest=9860

Check warning on line 1426 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=AZ253sAclyTdSDttC8i0&open=AZ253sAclyTdSDttC8i0&pullRequest=9860

Check warning on line 42 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=AZ253sAclyTdSDttC8ip&open=AZ253sAclyTdSDttC8ip&pullRequest=9860

Check warning on line 753 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=AZ253sAclyTdSDttC8iw&open=AZ253sAclyTdSDttC8iw&pullRequest=9860

Check warning on line 116 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=AZ253sAclyTdSDttC8iq&open=AZ253sAclyTdSDttC8iq&pullRequest=9860

Check warning on line 853 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=AZ2bMYISg--gWPrDHh9p&open=AZ2bMYISg--gWPrDHh9p&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=AZ2bMYISg--gWPrDHh9k&open=AZ2bMYISg--gWPrDHh9k&pullRequest=9860

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check warning on line 1276 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=AZ2bMYISg--gWPrDHh9x&open=AZ2bMYISg--gWPrDHh9x&pullRequest=9860

Check warning on line 1054 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=AZ253sAclyTdSDttC8ix&open=AZ253sAclyTdSDttC8ix&pullRequest=9860

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

This lambda has 84 lines, which is greater than the 20 lines authorized. Split it into several lambdas or functions, or make it a named function.

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check warning on line 341 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=AZ253sHAlyTdSDttC8jU&open=AZ253sHAlyTdSDttC8jU&pullRequest=9860

Check warning on line 1276 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=AZ2bMYISg--gWPrDHh90&open=AZ2bMYISg--gWPrDHh90&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=AZ253sHAlyTdSDttC8jT&open=AZ253sHAlyTdSDttC8jT&pullRequest=9860

Check warning on line 575 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=AZ253sAclyTdSDttC8iu&open=AZ253sAclyTdSDttC8iu&pullRequest=9860

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

Check warning on line 2257 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=AZ253sAclyTdSDttC8jM&open=AZ253sAclyTdSDttC8jM&pullRequest=9860

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check warning on line 1084 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=AZ2bMYISg--gWPrDHh9s&open=AZ2bMYISg--gWPrDHh9s&pullRequest=9860