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

Error logged when creating a new share #3768

Closed
klada opened this issue Mar 8, 2017 · 6 comments
Closed

Error logged when creating a new share #3768

klada opened this issue Mar 8, 2017 · 6 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: sharing stale Ticket or PR with no recent activity

Comments

@klada
Copy link

klada commented Mar 8, 2017

I am getting the following errors in my NextCloud server log when creating a new share:

[ERROR] -- 2017-03-08 10:19:08+01:00 --
[ERROR] PUT /ocs/v2.php/apps/files_sharing/api/v1/shares/3716?format=json
[ERROR] User: 'klada'@'192.168.1.8'
[ERROR] $params["date"] was missing. Transferred value: Array
(
    [itemType] => file
    [itemSource] => 377423
    [date] => 
    [uidOwner] => klada
)

Apache log

192.168.1.8 - - [08/Mar/2017:10:19:08 +0100] "PUT /ocs/v2.php/apps/files_sharing/api/v1/shares/3716?format=json HTTP/1.1" 200 750 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36" 0

The share itself is working, it's just a nasty error in the log.

Steps to reproduce:

  1. Click on the "Share" button
  2. Tick "Share by link"
  3. Remove the option "Set expiredate" (an expire date is set by default for all shares in my instance)

NextCloud version: 11.0.2

@klada klada changed the title Error in /ocs/v2.php when creating a new share Error logged when creating a new share Mar 8, 2017
@MorrisJobke MorrisJobke added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: sharing labels Mar 8, 2017
@MorrisJobke
Copy link
Member

cc @schiessle @rullzer

@rullzer
Copy link
Member

rullzer commented Mar 9, 2017

Mmm I can't reproduce this.

But what I find most strange is that the date field is not even correct. It should be expireDate. And the rest should not be send with it.

Can you check your browser console what the actual PUT request is?

@klada
Copy link
Author

klada commented Mar 9, 2017

This is the actual PUT XHR body:

{
    "headersSize": 1401,
    "bodySize": 11,
    "postData": {
        "mimeType": "application/x-www-form-urlencoded; charset=UTF-8",
        "text": "expireDate=",
        "params": [
            {
            "name": "expireDate",
            "value": ""
            }
        ]
    }
}

And it can also be reproduced without an expiration date policy in Nextcloud 11.0.2:

  1. Create a new share by link
  2. Enable expire date and set any date
  3. Disable expire date again → this is when the error shows up in the log

@rullzer
Copy link
Member

rullzer commented Mar 9, 2017

I still don't get a warning in my logs... @schiessle can you give this a go?

@klada
Copy link
Author

klada commented Mar 9, 2017

Sorry guys, I forgot to mention that this error is logged by admin_audit 🤦‍♂️ . So the admin_audit log app needs to be enabled in order to reproduce this.

So this is probably a bug in admin_audit...

@skjnldsv
Copy link
Member

As there is no feedback since a while I will close this ticket. If this is still happening please feel free to reopen.

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 bug feature: sharing stale Ticket or PR with no recent activity
Projects
None yet
Development

No branches or pull requests

5 participants