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

Username with space #8429

Closed
marinofaggiana opened this issue Feb 19, 2018 · 8 comments
Closed

Username with space #8429

marinofaggiana opened this issue Feb 19, 2018 · 8 comments

Comments

@marinofaggiana
Copy link
Member

Steps to reproduce

  1. Configure a new user with space on username es. marino faggiana

Expected behaviour

Tell us what should happen

The UserdID : must be without space

Actual behaviour

Tell us what happens instead

The UserID is "marino faggiana"

Server configuration

Operating system:

Web server:

Database:

PHP version:

Nextcloud version: (see Nextcloud admin page)

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from:

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.

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

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, …)

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

LDAP configuration (delete this part if not used)

LDAP config
With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

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) ...
@rullzer
Copy link
Member

rullzer commented Feb 20, 2018

What you propose is not a solution. You need to be able to handle userID's with spaces. Because we can't migrate old user ids.

What is the problem you are facing with userids with spaces?

@marinofaggiana
Copy link
Member Author

marinofaggiana commented Feb 20, 2018

UserID : 123 456

<?xml version="1.0"?>
<d:searchrequest xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
  <d:basicsearch>
    <d:select>
      <d:prop>
        <d:getlastmodified/>
        <d:getetag/>
        <d:getcontenttype/>
        <d:resourcetype/>
        <d:getcontentlength/>
        <oc:fileid/>
        <oc:id/>
        <oc:permissions/>
        <oc:size/>
        <oc:favorite/>
        <nc:is-encrypted/>
      </d:prop>
    </d:select>
    <d:from>
      <d:scope>
        <d:href>/files/123%20456</d:href>
        <d:depth>infinity</d:depth>
      </d:scope>
    </d:from>
    <d:where>
      <d:like>
        <d:prop>
          <d:displayname/>
        </d:prop>
        <d:literal>%Doc%</d:literal>
      </d:like>
    </d:where>
  </d:basicsearch>
</d:searchrequest>

return error 404

<?xml version="1.0"?>
<d:searchrequest xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
  <d:basicsearch>
    <d:select>
      <d:prop>
        <d:getlastmodified/>
        <d:getetag/>
        <d:getcontenttype/>
        <d:resourcetype/>
        <d:getcontentlength/>
        <oc:fileid/>
        <oc:id/>
        <oc:permissions/>
        <oc:size/>
        <oc:favorite/>
        <nc:is-encrypted/>
      </d:prop>
    </d:select>
    <d:from>
      <d:scope>
        <d:href>/files/123 456</d:href>
        <d:depth>infinity</d:depth>
      </d:scope>
    </d:from>
    <d:where>
      <d:like>
        <d:prop>
          <d:displayname/>
        </d:prop>
        <d:literal>%Doc%</d:literal>
      </d:like>
    </d:where>
  </d:basicsearch>
</d:searchrequest>

return file not found

@rullzer
Copy link
Member

rullzer commented Feb 20, 2018

Ok I'll look into it

@rullzer
Copy link
Member

rullzer commented Feb 20, 2018

Your second example works just fine on master. I'll try stable13 tomorrow.

@marinofaggiana
Copy link
Member Author

marinofaggiana commented Feb 20, 2018

My second works but .. don't return records ... (NC 13)

@rullzer
Copy link
Member

rullzer commented Feb 20, 2018

It returns records just fine here.

@rullzer
Copy link
Member

rullzer commented Feb 20, 2018

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:card="urn:ietf:params:xml:ns:carddav" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
  <d:response>
    <d:href>/remote.php/dav/files/123%20456/doc/</d:href>
    <d:propstat>
      <d:prop>
        <d:getlastmodified>Tue, 20 Feb 2018 20:51:20 GMT</d:getlastmodified>
        <d:getetag>"5a8c8a4874555"</d:getetag>
        <d:resourcetype>
          <d:collection/>
        </d:resourcetype>
        <oc:fileid>110</oc:fileid>
        <oc:id>00000110oc02qh89cd7d</oc:id>
        <oc:permissions>RGDNVCK</oc:permissions>
        <oc:size>0</oc:size>
        <oc:favorite>0</oc:favorite>
        <nc:is-encrypted>0</nc:is-encrypted>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
    <d:propstat>
      <d:prop>
        <d:getcontenttype/>
        <d:getcontentlength/>
      </d:prop>
      <d:status>HTTP/1.1 404 Not Found</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/dav/files/123%20456/a%20Doc%20A/</d:href>
    <d:propstat>
      <d:prop>
        <d:getlastmodified>Tue, 20 Feb 2018 20:51:25 GMT</d:getlastmodified>
        <d:getetag>"5a8c8a4d0895a"</d:getetag>
        <d:resourcetype>
          <d:collection/>
        </d:resourcetype>
        <oc:fileid>111</oc:fileid>
        <oc:id>00000111oc02qh89cd7d</oc:id>
        <oc:permissions>RGDNVCK</oc:permissions>
        <oc:size>0</oc:size>
        <oc:favorite>0</oc:favorite>
        <nc:is-encrypted>0</nc:is-encrypted>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
    <d:propstat>
      <d:prop>
        <d:getcontenttype/>
        <d:getcontentlength/>
      </d:prop>
      <d:status>HTTP/1.1 404 Not Found</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

@marinofaggiana
Copy link
Member Author

ok @rullzer, I have found the issue on old driver ownCloud (iOS). thanks !

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

No branches or pull requests

2 participants