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

SHARE API: shareType 4 (by email) creation does not set the default expire date #25008

Closed
marcos-guerrero opened this issue Jan 7, 2021 · 3 comments
Labels

Comments

@marcos-guerrero
Copy link

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Stablish sharing configuration (Settings / admin / sharing) of "Set default expiration date for shares" of 20 days.
  2. Create (thru the API) a shareType 4 with no expireDate

POST http://maqueta-refs-backend.isastur.local/ocs/v2.php/apps/files_sharing/api/v1/shares HTTP/1.1
Host: maqueta-refs-backend.isastur.local
Authorization: Basic **************
Connection: Keep-Alive
OCS-APIRequest: true
Accept: application/json, text/plain, */*
Content-Length: 113
Content-Type: application/x-www-form-urlencoded

path=%2FRefs%2F13%2Fd3%2Ff9%2FR_DIR_15F008&shareType=4&shareWith=TEST%40isastur.com

Expected behaviour

The server should set the expire date of the link in 20 days (as the server does when generate a share type 3)

Actual behaviour

The server generates the link with no expire date

Server configuration

Operating system: Ubuntu 20.04 LTS

Web server: Apache 2.4.36

Database: MariaDB 10.3.13

PHP version: 7.4.13

Nextcloud version: 20.0.4

Updated from an older Nextcloud/ownCloud or fresh install: Updated

Where did you install Nextcloud from: manual instalation

Signing status:

Signing status
Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

No errors have been found.

List of activated apps:

App list
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Enabled:

  • bruteforcesettings: 2.0.1
  • cloud_federation_api: 1.3.0
  • dav: 1.16.2
  • federatedfilesharing: 1.10.2
  • files: 1.15.0
  • files_external: 1.11.1
  • files_rightclick: 0.17.0
  • files_sharing: 1.12.1
  • files_videoplayer: 1.9.0
  • logreader: 2.5.0
  • lookup_server_connector: 1.8.0
  • oauth2: 1.8.0
  • password_policy: 1.10.1
  • photos: 1.2.1
  • provisioning_api: 1.10.0
  • serverinfo: 1.10.0
  • settings: 1.2.0
  • sharebymail: 1.10.0
  • theming: 1.11.0
  • twofactor_backupcodes: 1.9.0
  • twofactor_totp: 5.0.0
  • viewer: 1.4.0
  • workflowengine: 2.2.0
    Disabled:
  • accessibility
  • activity
  • admin_audit
  • comments
  • contactsinteraction
  • dashboard
  • encryption
  • federation
  • files_pdfviewer
  • files_trashbin
  • files_versions
  • firstrunwizard
  • nextcloud_announcements
  • notifications
  • privacy
  • recommendations
  • support
  • survey_client
  • systemtags
  • text
  • updatenotification
  • user_ldap
  • user_status
  • weather_status

Nextcloud configuration:

Config report
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or 

Insert your config.php content here. 
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

{
"system": {
"version": "20.0.4.0",
"instanceid": "REMOVED SENSITIVE VALUE",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"maqueta-refs-backend.isastur.local",
"localhost"
],
"trusted_proxies": "REMOVED SENSITIVE VALUE",
"overwritecondaddr": "^192\.168\.109\.(3[2-9]|4[0-9]|5[0-9]|6[0-3])$",
"overwriteprotocol": "https",
"overwrite.cli.url": "http://localhost",
"datadirectory": "REMOVED SENSITIVE VALUE",
"dbtype": "mysql",
"dbname": "REMOVED SENSITIVE VALUE",
"dbhost": "REMOVED SENSITIVE VALUE",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"installed": true,
"memcache.local": "\OC\Memcache\APCu",
"memcache.distributed": "\OC\Memcache\APCu",
"filelocking.enabled": true,
"memcache.locking": "\OC\Memcache\Redis",
"redis": {
"host": "REMOVED SENSITIVE VALUE",
"port": 6379,
"dbindex": 14,
"timeout": 5
},
"enable_previews": false,
"has_internet_connection": true,
"logfile": "/disco_datos_nextcloud/logs/nextcloud.log",
"loglevel": 2,
"htaccess.RewriteBase": "/",
"mail_from_address": "REMOVED SENSITIVE VALUE",
"mail_smtpmode": "smtp",
"mail_sendmailmode": "smtp",
"mail_smtphost": "REMOVED SENSITIVE VALUE",
"mail_smtpport": "4000",
"mail_domain": "REMOVED SENSITIVE VALUE",
"maintenance": false
}
}

Are you using external storage, if yes which one: local

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser:

Operating system:

Logs

Web server error log

Web server error log
Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Nextcloud log
Insert your Nextcloud log here

Browser log

Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...
@marcos-guerrero marcos-guerrero added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jan 7, 2021
@marcos-guerrero marcos-guerrero changed the title SHARE API: shareType 4 (by email) creation does not set the default expire date (as shareType 3 does) SHARE API: shareType 4 (by email) creation does not set the default expire date Jan 7, 2021
@kurn77
Copy link

kurn77 commented Jan 11, 2021

Same issue than #24905 ?

@marcos-guerrero
Copy link
Author

Same issue than #24905 ?

I think so, and it's my fault not have found it before open mine, I issued this one and other related #25006 to share API ...
even if this is closed as duplicated it contains more information about the server configuration and how to reproduce it

@skjnldsv skjnldsv added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Mar 22, 2021
@skjnldsv
Copy link
Member

See #24905

@skjnldsv skjnldsv reopened this Mar 22, 2021
@skjnldsv skjnldsv removed the 1. to develop Accepted and waiting to be taken care of label Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants