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

[Bug]: Share-Link Creation-Form Expiration-Date Datepicker displays wrong Default-Value #42606

Closed
6 of 8 tasks
Finnlife opened this issue Jan 6, 2024 · 3 comments
Closed
6 of 8 tasks
Assignees
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 28-feedback bug

Comments

@Finnlife
Copy link

Finnlife commented Jan 6, 2024

⚠️ This issue respects the following points: ⚠️

Bug description

If you set the link_defaultExpDays / internal_defaultExpDays to a value (lets say 7) and set the shareapi_expire_after_n_days to 30,
the Front-End sets the day in 30 days as the default-value of the Datepicker while creating a new Share-Link.

Maybe an issue with the default-value of the Picker?
https://github.com/nextcloud/server/blob/2e10c9431068c43432a496d607667b0595c6cdae/apps/files_sharing/src/components/SharingEntryLink.vue#L495C90-L495C90

I don't know how to pass the configured values to the Front-End, else I would've tried that.

Steps to reproduce

  1. Set the default Sharing-Link-Expiration-Value to 30
  2. Set link_defaultExpDays and internal_defaultExpDays to 7 as described in the wiki
  3. Try to create a new Share-Link in the Web-UI on a File or Directory.
  4. See which Date is set as default in the Datepicker of the Expiration.
    It's set in 30 days, not in 7.

Expected behavior

As decribed in the wiki this should enable a default and max situation.
If internal_defaultExpDays and link_defaultExpDays where set to 7 and the shareapi_expire_after_n_days is still 30, the default value should be 7 days and the Share should be configured with a max Expiration-Date in 30 days in the Datepicker.

image

Installation method

Community Docker image

Nextcloud Server version

28

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Nginx

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 22 to 23)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "default_phone_region": "DE",
        "skeletondirectory": "",
        "defaultapp": "files",
        "knowledgebaseenabled": false,
        "allow_user_to_change_display_name": false,
        "lost_password_link": "disabled",
        "trashbin_retention_obligation": "auto, 14",
        "ldapUserCleanupInterval": 30,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "overwritehost": "ext-cloud.example.de",
        "overwriteprotocol": "https",
        "overwrite.cli.url": "https:\/\/ext-cloud.example.de",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpsecure": "tls",
        "mail_smtpauth": true,
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "ext-cloud.example.de"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.1.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "loglevel": 2,
        "maintenance": false
    }
}

List of activated Apps

Enabled:
  - circles: 28.0.0-dev
  - cloud_federation_api: 1.11.0
  - comments: 1.18.0
  - contactsinteraction: 1.9.0
  - dashboard: 7.8.0
  - dav: 1.29.1
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - notifications: 2.16.0
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - photos: 2.4.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - support: 1.11.0
  - systemtags: 1.18.0
  - text: 3.9.1
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - user_ldap: 1.19.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - workflowengine: 2.10.0
Disabled:
  - admin_audit: 1.18.0
  - bruteforcesettings: 2.8.0
  - encryption: 2.16.0
  - files_external: 1.20.0
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - suspicious_login: 6.0.0
  - twofactor_totp: 10.0.0-beta.2

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No response

Additional info

I think the link_defaultExpDays / internal_defaultExpDays value need to be passed to the Frontend if they are set.
And the Datepicker should display a value calculated by this Config-Values.

@Finnlife Finnlife added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jan 6, 2024
@szaimen
Copy link
Contributor

szaimen commented Jan 6, 2024

Cc @fenn-cs

@Dennis1993
Copy link
Contributor

Dennis1993 commented Jan 27, 2024

broken

I can confirm this problem, I can't create a share with an expiration date... always 1900 is set. In NC 27.1.6 and 28.0.1 tested. It is not possible to create a share.

I try to set the value to "01.02.2024" but its not working with the keyboard

@nfebe nfebe self-assigned this Feb 13, 2024
@Dennis1993
Copy link
Contributor

Duplicate of #43230

@Dennis1993 Dennis1993 marked this as a duplicate of #43230 Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 28-feedback bug
Projects
None yet
Development

No branches or pull requests

4 participants