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]: Federation Share with Expiration Date, ($expireDate) must be of type string, DateTime given #41229

Closed
5 of 8 tasks
Input-BDF opened this issue Nov 1, 2023 · 6 comments · Fixed by #44838
Closed
5 of 8 tasks
Assignees

Comments

@Input-BDF
Copy link

⚠️ This issue respects the following points: ⚠️

Bug description

Sharing a file with expiration date to user on an other Nextcloud instance is not possible. Sharing per email or users within the same instanze is still possible. Test this with and without forced expiration date. Output from the Logs see below.

Steps to reproduce

  1. Enter user to share with e.g. someone@theother.cloud
  2. Check "Set expiration date" and select Date
  3. Save share
  4. User is informed that the operation failed

Expected behavior

Share is created with the given expiration date

Installation method

Community Manual installation with Archive

Nextcloud Server version

27

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MariaDB

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

None

Are you using the Nextcloud Server Encryption module?

None

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": [
            "localhost",
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "forwarded-for-headers": [
            "X-Forwarded-For",
            "HTTP_X_FORWARDED_FOR"
        ],
        "overwritehost": "***REMOVED SENSITIVE VALUE***",
        "overwritecondaddr": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "27.1.3.2",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "mysql.utf8mb4": true,
        "default_phone_region": "DE",
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_sendmailmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtpport": "25",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "htaccess.RewriteBase": "\/",
        "profile.enabled": true,
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "filelocking.enabled": true,
        "forbidden_chars": [
            [
                "?",
                "<",
                ">",
                ":",
                "*",
                "|",
                "\"",
                "\u0000",
                "\n",
                "\r"
            ]
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "skeletondirectory": "***REMOVED SENSITIVE VALUE***",
        "tempdirectory": "***REMOVED SENSITIVE VALUE***",
        "updatedirectory": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated Apps

Enabled:
  - activity: 2.19.0
  - appointments: 1.15.4
  - bruteforcesettings: 2.7.0
  - calendar: 4.5.2
  - circles: 27.0.1
  - cloud_federation_api: 1.10.0
  - comments: 1.17.0
  - contacts: 5.4.2
  - contactsinteraction: 1.8.0
  - dashboard: 7.7.0
  - dav: 1.27.0
  - deck: 1.11.0
  - federatedfilesharing: 1.17.0
  - federation: 1.17.0
  - files: 1.22.0
  - files_pdfviewer: 2.8.0
  - files_reminders: 1.0.0
  - files_sharing: 1.19.0
  - files_trashbin: 1.17.0
  - files_versions: 1.20.0
  - firstrunwizard: 2.16.0
  - groupfolders: 15.3.1
  - logreader: 2.12.0
  - lookup_server_connector: 1.15.0
  - maps: 1.1.1
  - news: 24.0.0
  - nextcloud_announcements: 1.16.0
  - notes: 4.8.1
  - notifications: 2.15.0
  - oauth2: 1.15.1
  - password_policy: 1.17.0
  - photos: 2.3.0
  - privacy: 1.11.0
  - provisioning_api: 1.17.0
  - recommendations: 1.6.0
  - related_resources: 1.2.0
  - serverinfo: 1.17.0
  - settings: 1.9.0
  - sharebymail: 1.17.0
  - side_menu: 3.10.3
  - survey_client: 1.15.0
  - systemtags: 1.17.0
  - tasks: 0.15.0
  - text: 3.8.0
  - theming: 2.2.0
  - twofactor_backupcodes: 1.16.0
  - updatenotification: 1.17.0
  - user_status: 1.7.0
  - viewer: 2.1.0
  - weather_status: 1.7.0
  - workflowengine: 2.9.0
Disabled:
  - admin_audit: 1.17.0
  - calendar_resource_management: 0.5.0 (installed 0.5.0)
  - carnet: 0.25.2 (installed 0.25.2)
  - encryption: 2.15.0
  - external: 5.2.1 (installed 5.2.1)
  - files_automatedtagging: 1.17.0 (installed 1.17.0)
  - files_external: 1.19.0
  - files_rightclick: 1.6.0 (installed 0.15.1)
  - support: 1.10.0 (installed 1.10.0)
  - suspicious_login: 5.0.0
  - twofactor_totp: 9.0.0
  - user_ldap: 1.17.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

ntext	Exception: OCA\Files_Sharing\Controller\ShareAPIController::parseDate(): Argument #1 ($expireDate) must be of type string, DateTime given, called in /var/www/nextcloud/apps/files_sharing/lib/Controller/ShareAPIController.php on line 820 in file '/var/www/nextcloud/apps/files_sharing/lib/Controller/ShareAPIController.php' line 1680

    /var/www/nextcloud/lib/private/AppFramework/App.php - line 183:

    OC\AppFramework\Http\Dispatcher->dispatch()

    /var/www/nextcloud/lib/private/Route/Router.php - line 315:

    OC\AppFramework\App::main()

    /var/www/nextcloud/ocs/v1.php - line 64:

    OC\Route\Router->match()

    /var/www/nextcloud/ocs/v2.php - line 23:

    require_once("/var/www/nextcloud/ocs/v1.php")

Verursacht durch TypeError: OCA\Files_Sharing\Controller\ShareAPIController::parseDate(): Argument #1 ($expireDate) must be of type string, DateTime given, called in /var/www/nextcloud/apps/files_sharing/lib/Controller/ShareAPIController.php on line 820

    /var/www/nextcloud/apps/files_sharing/lib/Controller/ShareAPIController.php - line 820:

    OCA\Files_Sharing\Controller\ShareAPIController->parseDate()

    /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 230:

    OCA\Files_Sharing\Controller\ShareAPIController->createShare("*** sensiti ... *")

    /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 137:

    OC\AppFramework\Http\Dispatcher->executeController()

    /var/www/nextcloud/lib/private/AppFramework/App.php - line 183:

    OC\AppFramework\Http\Dispatcher->dispatch()

    /var/www/nextcloud/lib/private/Route/Router.php - line 315:

    OC\AppFramework\App::main()

    /var/www/nextcloud/ocs/v1.php - line 64:

    OC\Route\Router->match()

    /var/www/nextcloud/ocs/v2.php - line 23:

    require_once("/var/www/nextcloud/ocs/v1.php")

Additional info

No response

@Input-BDF Input-BDF added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Nov 1, 2023
@devz3r0
Copy link

devz3r0 commented Nov 4, 2023

I am having the same issue, with the same setup but with PHP 8.2

@szaimen
Copy link
Contributor

szaimen commented Nov 4, 2023

Cc @fenn-cs

@nfebe nfebe self-assigned this Nov 4, 2023
@patman15
Copy link

Same here: Nextcloud Hub 6 (27.1.3), PHP Version: 8.2.7

@come-nc come-nc 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 25, 2024
@come-nc
Copy link
Contributor

come-nc commented Mar 25, 2024

Reproduced on 28

@quinnzipse
Copy link

Same problem: on v28.0.2.5

@nfebe
Copy link
Contributor

nfebe commented Apr 8, 2024

Looks like an error in the server, I triaged this last week and a string is sent back to the sever, would further investigate. I think is issue is reproducible even on master.

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

Successfully merging a pull request may close this issue.

8 participants