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

When there is more than one username in the system, requests for all users return an empty reply return value of 200 #11094

Closed
jack9603301 opened this issue Sep 6, 2018 · 4 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug needs info stale Ticket or PR with no recent activity

Comments

@jack9603301
Copy link

jack9603301 commented Sep 6, 2018

When there is more than one username in the system, requests for all users return an empty reply return value of 200, as follows: http://cloud.qhjack.cn/ocs/v2.php/cloud/users/details?offset=0&limit=25&search=

The request body is:

Host: cloud.qhjack.cn
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0
Accept: application/json, text/plain, */*
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
requesttoken: KlYqeDh+if22ksSrQQeHlNLlCNPCX2nrDMRahhCwt3w=:bDhDTGofwKff3I7yNk/B8qiGeOP0CgDTVaYevnyDgRc=
Cookie: UM_distinctid=164f8d2f77d0-067ab8095fe8-4c312b7b-144000-164f8d2f77ef8; nc_sameSiteCookielax=true; nc_sameSiteCookiestrict=true; oc_sessionPassphrase=5DzUQDnFMsLpYg4nKHG6MdFXKXMWvVmDtgT3%2FtadEHORsGgGyKUzNl8sYHyjv0DYa6HrT4SqwpyMOei1OqKLSGjvhZzUOxTJh9rmcAvZWyiFMVgR6DgXAEgSX%2F52YqvR; oca9dt8y31m2=22b6d166b7c4a4e2d6a0fa08074e6498; nc_username=jack960330; nc_token=cAoARLJA9vmqIAugH%2BUrtDoLIRNyVXYs; nc_session_id=22b6d166b7c4a4e2d6a0fa08074e6498
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache

The response body is:

HTTP/1.1 200 OK
Server: openresty/1.13.6.2
Date: Thu, 06 Sep 2018 15:51:58 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
X-Powered-By: PHP/7.2.5
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval' 'nonce-c3g5d3dUbVVKY2RvTEo5K3lIcFBhSW9ydnZXSnV0NExIYnZhV2cwa3pUQT06OVhFWjlXdjFiSjBCWXRVbnZ6SUpEdkJJenNXLzc3Y3pSTm1lWW1FWCsxcz0='; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *; object-src 'none'; base-uri 'self';
X-Frame-Options: SAMEORIGIN
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Robots-Tag: none
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Content-Encoding: gzip

nginx vhost config:

server {
    listen 80;
    server_name cloud.qhjack.cn;
    root /www/root/nextcloud;
    index index.php index.html;
    limit_req zone=server burst=30 nodelay;
    limit_req_status 503;
    limit_req_log_level error;
    limit_rate 100k;

    add_header X-Frame-Options SAMEORIGIN;
    add_header X-Content-Type-Options nosniff;
    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Robots-Tag none;
    add_header X-Download-Options noopen;
    add_header X-Permitted-Cross-Domain-Policies none;

    set $auto_blacklist_key "nextcloud";
    include blacklist_params;
    access_by_lua_file /www/server/nginx/lua/access_contral.lua;

    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME $document_root/$fastcgi_script_name;
        include        fastcgi_params;
    }

    location / {
        if (-f $request_filename/index.html){
            rewrite (.*) $1/index.html break;
        }
        if (-f $request_filename/index.php){
            rewrite (.*) $1/index.php last;
        }
        if (!-f $request_filename){
            rewrite (.*) /index.php$1 last;
        }
    }
    rewrite ^/index.php/s/(.*) /s/$1  permanent;
    rewrite ^/index.php/f/(.*) /f/$1  permanent;

    location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) {
        include fastcgi_params;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_param modHeadersAvailable true;
        fastcgi_param front_controller_active true;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_intercept_errors on;
        fastcgi_request_buffering off;
    }

    location ~ ^/(?:remote)\.php/(webdav|dav)(?:$|/) {
        dav_methods PUT DELETE MKCOL COPY MOVE;
        dav_ext_methods PROPFIND OPTIONS;
        create_full_put_path on;
        dav_access user:rw group:r all:r;
    }

    location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
        deny all;
    }

    location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
        deny all;
    }

    charset utf-8;
    error_log /www/log/nextcloud/error.log;
    access_log /www/log/nextcloud/access.log;

    # 自定义错误页面
    error_page 500 /www/server/nginx/page/500.html;
    error_page 503 /www/server/nginx/page/503.html;
    error_page 502 /www/server/nginx/page/502.html;
    error_page 403 /www/server/nginx/page/403.html;

    location ~* \.(jpg|jpeg|gif|png|ico|swf)$ {
        expires 3y;
        access_log off;
    }

    location /robots.txt$ {
        allow all;
        log_not_found off;
        access_log off;
    }
}
@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #6986 (Infinite loop when there is more than one LDAP entry for a user in file sharing), #3289 (No WebDav Error when system is in single user mode), #2778 (Send Meeting Request by Logged-in User), and #10738 (Only sends an update sort order request if there is an user).

@jack9603301
Copy link
Author

How to solve this problem?

@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Jun 12, 2019
@kesselb
Copy link
Contributor

kesselb commented Aug 17, 2019

Does this error still occur? If so please edit your post and add the issue template. It's much easier to reproduce a problem with the issue template.

@ghost
Copy link

ghost commented Sep 16, 2019

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

@ghost ghost added the stale Ticket or PR with no recent activity label Sep 16, 2019
@ghost ghost closed this as completed Sep 30, 2019
This issue was closed.
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 needs info stale Ticket or PR with no recent activity
Projects
None yet
Development

No branches or pull requests

4 participants