Sharing a file via email and password protect the link
Steps to reproduce
- upload a file
- share it via email
- done the email will be send an the link inside will not have any form of security
Expected behavior
I would expect that the nextcloud instance should have the function to password protect the link inside the email.
Actual behavior
The link inside the email will get shared without a password.
Server configuration
Operating system: Distributor ID: Debian Description: Debian GNU/Linux 8.6 (jessie) Release: 8.6 Codename: jessie
Web server: Server version: Apache/2.4.10 (Debian) Server built: Sep 15 2016 20:44:43 Server's Module Magic Number: 20120211:37 Server loaded: APR 1.5.1, APR-UTIL 1.5.4 Compiled using: APR 1.5.1, APR-UTIL 1.5.4 Architecture: 64-bit
Database: mysql Ver 14.14 Distrib 5.5.53, for debian-linux-gnu (x86_64) using readline 6.3
PHP version: PHP 7.0.13-1 dotdeb+8.1 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.13-1 dotdeb+8.1, Copyright (c) 1999-2016, by Zend Technologies
Nextcloud version: (see Nextcloud admin page) version: 11.0.0.4 versionstring: 11.0 beta edition:
Updated from an older Nextcloud/ownCloud or fresh install: updated nextcloud from 9 > 10 > 11beta
Where did you install Nextcloud from: official website download signed tar.gz
**List of activated apps:**
<details>
<summary>Enabled:
- activity: 2.4.1
- admin_audit: 1.1.0
- announcementcenter: 3.0.0
- apporder: 0.3.3
- audioplayer: 1.3.1
- calendar: 1.4.1
- comments: 1.1.0
- dav: 1.1.1
- direct_menu: 0.9.3
- federatedfilesharing: 1.1.1
- federation: 1.1.1
- files: 1.6.1
- files_external: 1.1.2
- files_pdfviewer: 1.0.1
- files_retention: 1.0.1
- files_sharing: 1.1.1
- files_texteditor: 2.2
- files_trashbin: 1.1.0
- files_versions: 1.4.0
- files_videoplayer: 1.0.0
- firstrunwizard: 2.0
- gallery: 16.0.0
- logreader: 1.3.1
- lookup_server_connector: 1.0.0
- news: 10.0.0
- nextcloud_announcements: 1.0
- notifications: 1.0.1
- password_policy: 1.1.0
- provisioning_api: 1.1.0
- serverinfo: 1.1.1
- sharebymail: 1.0.0
- systemtags: 1.1.3
- templateeditor: 0.2
- theming: 1.1.1
- twofactor_backupcodes: 1.0.0
- twofactor_totp: true
- updatenotification: 1.1.1
- workflowengine: 1.1.1
</summary>
</details>
**The content of config/config.php:**
<details>
<summary>Config report</summary>
"system": {
"instanceid": "ocdwzxwi729i",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"cloud.magicbroccoli.de"
],
"datadirectory": "\/var\/www\/magicbroccoli.de\/data",
"version": "11.0.0.4",
"installed": true,
"cipher": "AES-256-CFB",
"dbtype": "mysql",
"dbname": "nextcloud",
"dbhost": "localhost",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"default_language": "de",
"defaultapp": "files",
"enable_avatars": true,
"allow_user_to_change_display_name": true,
"remember_login_cookie_lifetime": 1296000,
"session_lifetime": 86400,
"auth.bruteforce.protection.enabled": true,
"mail_smtpmode": "smtp",
"mail_from_address": "nextcloud",
"mail_domain": "magicbroccoli.de",
"mail_smtpauth": 1,
"mail_smtpauthtype": "LOGIN",
"mail_smtphost": "mail.server-speed.net",
"mail_smtpport": "587",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"mail_smtpsecure": "tls",
"updatechecker": true,
"updater.server.url": "https:\/\/updates.nextcloud.org\/server\/",
"upgrade.disable-web": false,
"has_internet_connection": true,
"check_for_working_htaccess": true,
"check_for_working_webdav": true,
"check_for_working_wellknown_setup": true,
"logdateformat": "d.m.Y - H:i:s",
"logtimezone": "Europe\/Berlin",
"log_rotate_size": 52428800,
"loglevel": 2,
"logfile": "\/var\/log\/nextcloud\/nextcloud.log",
"appstoreenabled": true,
"appstoreurl": "https:\/\/apps.nextcloud.com\/api\/v0",
"appstore.experimental.enabled": true,
"appcodechecker": false,
"apps_paths": [
{
"path": "\/var\/www\/magicbroccoli.de\/nextcloud\/apps",
"url": "\/apps",
"writable": true
}
],
"memcache.local": "\\OC\\Memcache\\APCu",
"filelocking.enabled": "true",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "\/var\/run\/redis\/redis.sock",
"port": 0,
"timeout": 0
},
"enable_previews": true,
"preview_max_x": 1024,
"preview_max_y": 1024,
"preview_max_filesize_image": 25,
"overwrite.cli.url": "https:\/\/cloud.magicbroccoli.de",
"htaccess.RewriteBase": "\/",
"trashbin_retention_obligation": "auto, 60",
"versions_retention_obligation": "auto",
"activity_expire_days": 80,
"filesystem_check_changes": 0,
"theme": "",
"maintenance": false,
"singleuser": false,
"updater.release.channel": "beta"
</details>
**Are you using external storage, if yes which one:** local/smb/sftp/...
yes local,nextcloud,Google,Dropbox,nfs
**Are you using encryption:** yes/no
no
**Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/...
no
cc @schiessle @jancborchardt
I kind of agree
A password to additionally protect the link would be perfect. I hope this idea will get implemented would be much easier to just send via email then generate a password protected link and sending that link via email. 👍
The question is how do you get the password to the recipient of the mail? If you write the password to the same mail it doesn't add any additional security. If you expect that people will share it on a different channel you will create a lot of confusion for many users because most expect that they just send out the mail and are done.
If you expect that people will share it on a different channel you will create a lot of confusion for many users because most expect that they just send out the mail and are done.
To get the password to the recipient of the mail is up to the user. But what is the point of allowing the user the ability to share a link with or without a password and not the same option when sharing via email and the important part is option. The confusion could happen when it's enforced but the same problem is present with the password protected link there the sender has to come around the same problem.
The idea is to just give the option to protect the link inside the mail. That feature would allow the user to choose. Depends on the use case but in some cases it is necessary to have a password protected link inside the mail so not just anybody opening a simple email can access the shared files. Sure it does not open any additional security if the user send the password and the link inside the same mail but there are so many messengers out there to notify the recipient about the password.
I'm quite sure that if we allow you to set a password but don't send it by mail one of the next request/bug report would be "I send a share to my friend and he can't open it. Why is the password not part of the mail?" And then? Should we then add a option to add the password to the mail or not (even if it makes absolutely no sense to add it to the same mail and would just increase the setting nightmare we already have for sharing)?
In my opinion a mail is a "secure enough" way to get the link to exactly the person it belong to. I know that everyone can intercept a mail, etc. But reality is that today most people either attach the file they want to share directly to the mail (and don't encrypt the mail!) or create a share link and send it by mail (most of the time without a password and if they set one they put it in the same mail). I don't consider it really useful for the majority of the users to send a file by mail and chose a second path to communicate the password.
Still if @nextcloud/designers have a idea how to integrate it nicely in the UI and we reach a majority who think (can convince me that) it makes sense, I'm happy to implement it.
I'm quite sure that if we allow you to set a password but don't send it by mail one of the next request/bug report would be "I send a share to my friend and he can't open it. Why is the password not part of the mail?" And then? Should we then add a option to add the password to the mail or not (even if it makes absolutely no sense to add it to the same mail and would just increase the setting nightmare we already have for sharing)?
@schiessle I really dont get the point. Sure some people will not get this and complain. But if that is the main goal to not have people complain then you could remove the feature all together. Why grant the ability to password protect a link but not a link inside an email?
I get that most people wont even use it, but as you said the send via email feature is quick and easy and with that i would stay quick and easy and on top of that would add just that tiny layer of security on top.
In my opinion a mail is a "secure enough" way to get the link to exactly the person it belong to.
Depends strongly on the email provider. Lets take google for example every email with a link through gmail gets crawled. Maybe I really dont want that. Email is not secure not at all.
But reality is that today most people either attach the file they want to share directly to the mail (and don't encrypt the mail!) or create a share link and send it by mail (most of the time without a password and if they set one they put it in the same mail).
Isn't nextcloud basic idea to take security in peoples own hands? Allowing such a feature is in my opinion a step in that direction.
I could be wrong though. I would definitely like that feature.
I really dont get the point. Sure some people will not get this and complain. But if that is the main goal to not have people complain then you could remove the feature all together.
No, because as it is now it serves a specific purpose and provides a good workflow and UX for this purpose. As said, I'm open for suggestions how a good workflow and UX could look like if we allow to set a password. At the moment I just don't see how to integrate this in the UI to make it work smoothly and don't confuse people.
While thinking about it... One possible solution could be that we add a "passwort protection" option right next to the share in the "..." menu which allows you to set a password.
Advantage:
- You would first share the file and then set the password, so there would be a good "excuse" not to put the password in the same mail.
- When a password was set/changed we could even consider to send the password by a separate mail. It would go to the same mail provider, so it wouldn't solve the "evil mail provider" issue but it would make it harder to intercept both mails (like the bank who send you two separate letters, one with your credit card and one with your pin)
Disadvantage:
- For a short periode in time the link would be accessible without a password, could be enough for the crawler of a "evil email provider"
For a short periode in time the link would be accessible without a password, could be enough for the crawler of a "evil email provider"
Same problem like we have with the file permissions. I'm still an advocate for having a proper sharing dialogue like Dropbox et al have.

I think that can be more something like this @LukasReschke

nice screenshots @Espina2 what program is this?
In general, please don't hijack this thread. Having a complete other share dialog is not part of this discussion. Please start a new threat for this discussion or, if it exists, reuse an existing one.
@schiessle sorry, for posting the screenshots here. Its another "dropbox" made in Portugal/Netherlands app. You can check here https://www.quiver.net/ . You just need to sign in and you will have that "dashboard".
But this screenshots are very similar for example with Asana https://asana.com/ you have to make login to.
@Espina2 Too many options, I think Dropbox looks better, but not optimal.
@enoch85 I think so too. Dropboxes UI is simple and easy and I think thats what @schiessle meant with not complicated / confusing
This have different context, looks better because it focus in a single thing.
I just want to show how many security layers that specific app have, and how it let you choose every single one. Just that.
Are there any news or is all hope lost :( ?
@mightybroccoli Calm down. This ticket is roughly one week old and we are just right before a release. So we don't spend mich time on new features