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]: NC 28.0.2 RC5 Trying to set expiration date for share – NC claims it's in the past #43243

Closed
5 of 8 tasks
Tracked by #3888
cetcondor opened this issue Jan 31, 2024 · 15 comments · Fixed by #43428
Closed
5 of 8 tasks
Tracked by #3888
Assignees
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 4. to release Ready to be released and/or waiting for tests to finish 28-feedback bug feature: sharing

Comments

@cetcondor
Copy link

⚠️ This issue respects the following points: ⚠️

Bug description

When trying to create a share with an expiration date, it fails. Nextcloud claims the date would be in the past, but it actually is in the future.

Steps to reproduce

  1. Create a share
  2. Try picking an expiration date for the share
  3. Saving won't work, because Nextcloud says the date is in the past, even though picked date isn't
    Bildschirmfoto vom 2024-01-31 18-19-40

Expected behavior

Expiration date should be saved

Installation method

None

Nextcloud Server version

28

Operating system

None

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MariaDB

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

Updated from a MINOR version (ex. 22.1 to 22.2)

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": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.2.4",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "skeletondirectory": "",
        "default_language": "de",
        "default_locale": "de_DE",
        "default_phone_region": "DE",
        "minimum.supported.desktop.version": "3.5.3",
        "activity_expire_days": 90,
        "filelocking.enabled": "true",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "htaccess.RewriteBase": "\/",
        "updater.release.channel": "stable",
        "maintenance": false,
        "theme": "",
        "loglevel": 3,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpsecure": "tls",
        "mail_smtpauthtype": "LOGIN",
        "app_install_overwrite": [
            "drawio",
            "deck"
        ]
    }
}

List of activated Apps

Enabled:
  - activity: 2.20.0
  - admin_audit: 1.18.0
  - bruteforcesettings: 2.8.0
  - calendar: 4.6.4
  - circles: 28.0.0-dev
  - cloud_federation_api: 1.11.0
  - comments: 1.18.0
  - contacts: 5.5.1
  - contactsinteraction: 1.9.0
  - dashboard: 7.8.0
  - dav: 1.29.1
  - deck: 1.12.1
  - drawio: 3.0.2
  - federatedfilesharing: 1.18.0
  - files: 2.0.0
  - files_antivirus: 5.4.1
  - files_lock: 28.0.1
  - files_mindmap: 0.0.30
  - 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
  - forms: 4.0.0
  - groupfolders: 16.0.3
  - holiday_calendars: 0.3.0
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - mail: 3.5.5
  - notes: 4.9.2
  - notifications: 2.16.0
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - photos: 2.4.0
  - polls: 6.0.1
  - provisioning_api: 1.18.0
  - quota_warning: 1.18.0
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - richdocuments: 8.3.1
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - spreed: 18.0.3
  - systemtags: 1.18.0
  - tasks: 0.15.0
  - terms_of_service: 2.3.2
  - text: 3.9.1
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - updatenotification: 1.18.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0
Disabled:
  - encryption: 2.16.0
  - externalpassword: 1.1.0 (installed 1.1.0)
  - federation: 1.18.0 (installed 1.14.0)
  - files_external: 1.20.0
  - firstrunwizard: 2.17.0 (installed 2.8.0)
  - nextcloud_announcements: 1.17.0 (installed 1.13.0)
  - privacy: 1.12.0 (installed 1.8.0)
  - ransomware_protection: 1.14.0 (installed 1.14.0)
  - support: 1.11.0 (installed 1.7.0)
  - survey_client: 1.16.0 (installed 1.12.0)
  - suspicious_login: 6.0.0 (installed 4.3.0)
  - twofactor_totp: 10.0.0-beta.2
  - user_ldap: 1.19.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

Exception OCA\Files_Sharing\Controller\ShareAPIController::parseDate(): Argument #1 ($expireDate) must be of type string, DateTime given, called in /***REMOVED SENSITIVE VALUE***/apps/files_sharing/lib/Controller/ShareAPIController.php on line 837 in file '/***REMOVED SENSITIVE VALUE***/apps/files_sharing/lib/Controller/ShareAPIController.php' line 1695
Exception thrown: Exception

Additional info

No response

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

szaimen commented Jan 31, 2024

cc @Fenn-CS

@Fenn-CS
Copy link
Contributor

Fenn-CS commented Jan 31, 2024

Could be related to : #42453 not sure yet.

@pierr0t
Copy link

pierr0t commented Feb 2, 2024

Just upgraded from 27.1.6 to 28.0.2 and I can confirm the problem which didn't exist in 27 as we use that feature quite frequently.

@manumitted
Copy link

manumitted commented Feb 2, 2024

I have my installation set to create a default expiration. I guess what's happening with mine is that I can't update the expiration date to a different value when I "customize link". (Note: I don't see an error message. But when I go back in to look at the link, the expiration date hasn't changed.)

@susnux
Copy link
Contributor

susnux commented Feb 3, 2024

@manumitted that is handled in #43256

@The-Judge
Copy link

I have the same issue. Behaviour demonstrated in https://youtu.be/3bly3t_dESs

@szaimen
Copy link
Contributor

szaimen commented Feb 15, 2024

cc @nextcloud/server-frontend

@artonge
Copy link
Contributor

artonge commented Feb 15, 2024

A fix is in its way here: #43428

@mathansen
Copy link

In addition to the "expiration date is in the past" error, the UI should display the date according to the configured locale in the user settings. The "set expiration date" input renders the date in US format mm/dd/yyyy for me, even though I have set my language to "English/Australia" (which uses the dd.mm.yyyy format).

@MalteP
Copy link

MalteP commented Feb 23, 2024

Can confirm it is possible to set a expiration date again in 28.0.3 RC2, but:

Each time the date is updated (or shown) one day goes missing; e.g. setting it to 31.03.2024 - save - press F5 to refresh the page - open settings again - settings show 30.03.2024. This only happens when the page is refreshed, so it might be a bug in the timezone conversion when loading the data from the backend?

@ccomb
Copy link

ccomb commented Feb 25, 2024

Hi, I consider this bug critical for the following reason : the error message is barely visible, and the sharing panel closes as if the operation was successful. It happened several times that I share a folder with a password and at the same time setting an expiration date. The result is that both fail, and I didn't realise that the folder was shared without password... :-/

@Altahrim Altahrim added 4. to release Ready to be released and/or waiting for tests to finish 0. Needs triage Pending check for reproducibility or if it fits our roadmap and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Feb 27, 2024
@Altahrim
Copy link
Collaborator

The fix has been merged in master.
The backport for stable28 is ready: #43833
Any test is welcome :)

@small1
Copy link

small1 commented Feb 29, 2024

I just tested with 28.0.3 bug is partially fixed. If you dont set a date and press save it will say it is set in the past. If you in the settings say a date 7 days ahead it will work. If you set just one day forward it will say date set in the past.

Screenshot from 2024-02-29 17-48-02
Screenshot from 2024-02-29 17-50-25

@artonge
Copy link
Contributor

artonge commented Feb 29, 2024

@Fenn-CS can you handle that as a follow up of your rewrite?

@Altahrim
Copy link
Collaborator

Altahrim commented Mar 1, 2024

#43833 wasn't included in 28.0.3. It was merged too late since second RC was already out.

@susnux susnux added this to the Nextcloud 28.0.4 milestone Mar 1, 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 4. to release Ready to be released and/or waiting for tests to finish 28-feedback bug feature: sharing
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.