Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/public links #4175

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Feature/public links #4175

wants to merge 1 commit into from

Conversation

mgallien
Copy link
Collaborator

No description provided.

@mgallien mgallien linked an issue Jan 13, 2022 that may be closed by this pull request
@mgallien mgallien force-pushed the feature/publicLinks branch 3 times, most recently from ae4ac1d to 044738b Compare January 20, 2022 13:38
@mgallien mgallien force-pushed the feature/publicLinks branch from 044738b to afcd2b6 Compare February 8, 2022 22:01
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 8, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

6.1% 6.1% Coverage
0.0% 0.0% Duplication

@allexzander
Copy link
Contributor

@mgallien How can this be tested?

@mgallien mgallien force-pushed the feature/publicLinks branch from 65ce5af to 02cecd0 Compare May 4, 2022 08:02
@mgallien mgallien force-pushed the feature/publicLinks branch from 02cecd0 to 844766a Compare May 17, 2022 07:37
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

6.1% 6.1% Coverage
0.0% 0.0% Duplication

@mgallien mgallien force-pushed the feature/publicLinks branch from 844766a to d02414f Compare June 30, 2022 13:08
@mgallien mgallien force-pushed the feature/publicLinks branch from d02414f to 0c6a294 Compare July 10, 2022 21:32
@mgallien
Copy link
Collaborator Author

@mgallien How can this be tested?

Using a nextcloud server you can create a public share link for a folder
With this link, use it as the server URL when adding a new account and it should just works

@mgallien mgallien force-pushed the feature/publicLinks branch 2 times, most recently from 5923be1 to 9866f8b Compare August 2, 2022 20:47
@codecov
Copy link

codecov bot commented Aug 2, 2022

Codecov Report

Merging #4175 (784bc65) into master (3400df4) will increase coverage by 0.10%.
The diff coverage is 34.48%.

@@            Coverage Diff             @@
##           master    #4175      +/-   ##
==========================================
+ Coverage   56.65%   56.75%   +0.10%     
==========================================
  Files         138      138              
  Lines       17143    17169      +26     
==========================================
+ Hits         9713     9745      +32     
+ Misses       7430     7424       -6     
Impacted Files Coverage Δ
src/libsync/networkjobs.cpp 49.48% <0.00%> (-0.44%) ⬇️
src/libsync/account.h 30.00% <25.00%> (+0.58%) ⬆️
src/libsync/account.cpp 38.93% <47.36%> (+0.07%) ⬆️
src/libsync/syncengine.cpp 87.20% <0.00%> (+0.54%) ⬆️
src/libsync/vfs/cfapi/cfapiwrapper.cpp 74.25% <0.00%> (+1.82%) ⬆️
src/libsync/vfs/cfapi/vfs_cfapi.cpp 87.45% <0.00%> (+2.35%) ⬆️
src/libsync/vfs/cfapi/hydrationjob.cpp 56.45% <0.00%> (+3.76%) ⬆️

@mgallien mgallien force-pushed the feature/publicLinks branch from 9866f8b to 784bc65 Compare August 3, 2022 15:07
@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 3, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

5.5% 5.5% Coverage
0.0% 0.0% Duplication

@fwcd
Copy link

fwcd commented Sep 15, 2023

Any updates on this?

@lauff
Copy link

lauff commented Oct 18, 2024

Is this already working?

@mgallien mgallien force-pushed the feature/publicLinks branch from 784bc65 to eddad3b Compare November 29, 2024 11:14
@mgallien mgallien marked this pull request as ready for review November 29, 2024 13:02
@Rello Rello added this to the 3.16.0 milestone Dec 3, 2024
@mgallien mgallien force-pushed the feature/publicLinks branch from eddad3b to a959b71 Compare December 3, 2024 15:30
Copy link

sonarqubecloud bot commented Dec 3, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
3.8% Coverage on New Code (required ≥ 80%)
C Maintainability Rating on New Code (required ≥ A)
73 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

currently sync does not work

you can login automatically unles a password is needed

in that case, you get a prompt

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
@mgallien mgallien force-pushed the feature/publicLinks branch from a959b71 to 0dc4cc5 Compare January 23, 2025 09:51
@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-4175-0dc4cc54043f091e2207e943ff09c6c8c3258261-x86_64.AppImage

To test this change/fix you can simply download above AppImage file and test it.

Please make sure to quit your existing Nextcloud app and backup your data.

@mgallien mgallien requested review from nilsding and allexzander and removed request for allexzander January 23, 2025 10:00
Copy link
Member

@nilsding nilsding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one small thing, really nice otherwise

side note: when I restarted the client I was prompted to sign in for the public share again, which doesn't really work ... but with the patch from #7768 applied it's fine

@@ -526,10 +530,26 @@ void Account::setSslErrorHandler(AbstractSslErrorHandler *handler)

void Account::setUrl(const QUrl &url)
{
_url = url;
const QRegularExpression discoverPublicLinks(R"((http.://[^/]*).*/s/([^/]*))");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice to have plain http:// links work too (e.g. for local dev)

Suggested change
const QRegularExpression discoverPublicLinks(R"((http.://[^/]*).*/s/([^/]*))");
const QRegularExpression discoverPublicLinks(R"((https?://[^/]*).*/s/([^/]*))");

Copy link
Member

@camilasan camilasan Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps we could allow http only when NEXTCLOUD_DEV is set.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
3.8% Coverage on New Code (required ≥ 80%)
74 New Code Smells (required ≤ 0)
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to add public shared folders to be used on desktop client
8 participants