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

CORS without Basic auth header results in HTTP 500 #11307

Closed
marcelklehr opened this issue Sep 20, 2018 · 7 comments
Closed

CORS without Basic auth header results in HTTP 500 #11307

marcelklehr opened this issue Sep 20, 2018 · 7 comments
Assignees
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@marcelklehr
Copy link
Member

marcelklehr commented Sep 20, 2018

Steps to reproduce

  1. Use an App with a CORS API endpoint
  2. make a call to that endpoint without the basic auth header

Expected behaviour

NC 13 would return a HTTP 401 arguing about the missing basic auth header.

Actual behaviour

NC 14 responds with a 500 code because the following exception is thrown:

Argument 1 passed to OC\\Authentication\\Token\\Manager::getToken() must be of the type string, null given, called in \/var\/www\/html\/nextcloud\/lib\/private\/User\/Session.php on line 480

Nextcloud log (data/nextcloud.log)

Nextcloud log
{"reqId":"fvnc4ku0u5vecOcCECQS","level":3,"time":"2018-09-20T17:06:55+00:00","remoteAddr":"192.168.10.230","user":"jibran","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/apps\/bookmarks\/public\/rest\/v2\/bookmark?format=rss&page=-1","message":"Undefined index: PHP_AUTH_USER at \/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Middleware\/Security\/CORSMiddleware.php#88","userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:63.0) Gecko\/20100101 Firefox\/63.0","version":"14.0.0.19"}
{"reqId":"fvnc4ku0u5vecOcCECQS","level":3,"time":"2018-09-20T17:06:55+00:00","remoteAddr":"192.168.10.230","user":"jibran","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/apps\/bookmarks\/public\/rest\/v2\/bookmark?format=rss&page=-1","message":"Undefined index: PHP_AUTH_PW at \/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Middleware\/Security\/CORSMiddleware.php#89","userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:63.0) Gecko\/20100101 Firefox\/63.0","version":"14.0.0.19"}
{"reqId":"fvnc4ku0u5vecOcCECQS","level":3,"time":"2018-09-20T17:06:55+00:00","remoteAddr":"192.168.10.230","user":"--","app":"index","method":"GET","url":"\/nextcloud\/index.php\/apps\/bookmarks\/public\/rest\/v2\/bookmark?format=rss&page=-1","message":{"Exception":"TypeError","Message":"Argument 1 passed to OC\\Authentication\\Token\\Manager::getToken() must be of the type string, null given, called in \/var\/www\/html\/nextcloud\/lib\/private\/User\/Session.php on line 480","Code":0,"Trace":[{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/User\/Session.php","line":480,"function":"getToken","class":"OC\\Authentication\\Token\\Manager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/User\/Session.php","line":404,"function":"isTokenPassword","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Middleware\/Security\/CORSMiddleware.php","line":93,"function":"logClientIn","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Middleware\/MiddlewareDispatcher.php","line":95,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\Security\\CORSMiddleware","type":"->","args":[{"__class__":"OCA\\Bookmarks\\Controller\\Rest\\BookmarkController"},"getBookmarks"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":98,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\MiddlewareDispatcher","type":"->","args":[{"__class__":"OCA\\Bookmarks\\Controller\\Rest\\BookmarkController"},"getBookmarks"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/App.php","line":118,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Bookmarks\\Controller\\Rest\\BookmarkController"},"getBookmarks"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["BookmarkController","getBookmarks",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"bookmarks.bookmark.get_bookmarks"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"bookmarks.bookmark.get_bookmarks"}]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Route\/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"bookmarks.bookmark.get_bookmarks"}]},{"file":"\/var\/www\/html\/nextcloud\/lib\/base.php","line":989,"function":"match","class":"OC\\Route\\Router","type":"->","args":["\/apps\/bookmarks\/public\/rest\/v2\/bookmark"]},{"file":"\/var\/www\/html\/nextcloud\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/var\/www\/html\/nextcloud\/lib\/private\/Authentication\/Token\/Manager.php","Line":112,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:63.0) Gecko\/20100101 Firefox\/63.0","version":"14.0.0.19"}
{"reqId":"pbUFAHPGr9FfkNRRqAP8","level":3,"time":"2018-09-20T17:07:42+00:00","remoteAddr":"192.168.10.230","user":"jibran","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/apps\/bookmarks\/public\/rest\/v2\/bookmark?format=rss&page=-1","message":"Undefined index: PHP_AUTH_USER at \/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Middleware\/Security\/CORSMiddleware.php#88","userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:63.0) Gecko\/20100101 Firefox\/63.0","version":"14.0.0.19"}
{"reqId":"pbUFAHPGr9FfkNRRqAP8","level":3,"time":"2018-09-20T17:07:42+00:00","remoteAddr":"192.168.10.230","user":"jibran","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/apps\/bookmarks\/public\/rest\/v2\/bookmark?format=rss&page=-1","message":"Undefined index: PHP_AUTH_PW at \/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Middleware\/Security\/CORSMiddleware.php#89","userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:63.0) Gecko\/20100101 Firefox\/63.0","version":"14.0.0.19"}
{"reqId":"pbUFAHPGr9FfkNRRqAP8","level":3,"time":"2018-09-20T17:07:42+00:00","remoteAddr":"192.168.10.230","user":"--","app":"index","method":"GET","url":"\/nextcloud\/index.php\/apps\/bookmarks\/public\/rest\/v2\/bookmark?format=rss&page=-1","message":{"Exception":"TypeError","Message":"Argument 1 passed to OC\\Authentication\\Token\\Manager::getToken() must be of the type string, null given, called in \/var\/www\/html\/nextcloud\/lib\/private\/User\/Session.php on line 480","Code":0,"Trace":[{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/User\/Session.php","line":480,"function":"getToken","class":"OC\\Authentication\\Token\\Manager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/User\/Session.php","line":404,"function":"isTokenPassword","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Middleware\/Security\/CORSMiddleware.php","line":93,"function":"logClientIn","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Middleware\/MiddlewareDispatcher.php","line":95,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\Security\\CORSMiddleware","type":"->","args":[{"__class__":"OCA\\Bookmarks\\Controller\\Rest\\BookmarkController"},"getBookmarks"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":98,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\MiddlewareDispatcher","type":"->","args":[{"__class__":"OCA\\Bookmarks\\Controller\\Rest\\BookmarkController"},"getBookmarks"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/App.php","line":118,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Bookmarks\\Controller\\Rest\\BookmarkController"},"getBookmarks"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["BookmarkController","getBookmarks",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"bookmarks.bookmark.get_bookmarks"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"bookmarks.bookmark.get_bookmarks"}]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Route\/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"bookmarks.bookmark.get_bookmarks"}]},{"file":"\/var\/www\/html\/nextcloud\/lib\/base.php","line":989,"function":"match","class":"OC\\Route\\Router","type":"->","args":["\/apps\/bookmarks\/public\/rest\/v2\/bookmark"]},{"file":"\/var\/www\/html\/nextcloud\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/var\/www\/html\/nextcloud\/lib\/private\/Authentication\/Token\/Manager.php","Line":112,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:63.0) Gecko\/20100101 Firefox\/63.0","version":"14.0.0.19"}
{"reqId":"cOHm6y2W36fJZZsqQtUc","level":3,"time":"2018-09-20T17:45:26+00:00","remoteAddr":"192.168.10.230","user":"jibran","app":"internet_connection_check","method":"GET","url":"\/nextcloud\/index.php\/settings\/ajax\/checksetup","message":{"Exception":"GuzzleHttp\\Exception\\ConnectException","Message":"cURL error 6: Could not resolve host: www.nextcloud.com (see http:\/\/curl.haxx.se\/libcurl\/c\/libcurl-errors.html)","Code":0,"Trace":[{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php","line":150,"function":"createRejection","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::","args":[{"sink":{"__class__":"GuzzleHttp\\Psr7\\Stream"},"headers":[],"response":null,"request":{"__class__":"GuzzleHttp\\Psr7\\Request"},"options":{"verify":"\/var\/www\/nextcloud-data\/files_external\/rootcerts.crt","synchronous":true,"handler":{"__class__":"GuzzleHttp\\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false},"errno":6,"onHeadersException":null,"__class__":"GuzzleHttp\\Handler\\EasyHandle"},{"errno":6,"error":"Could not resolve host: www.nextcloud.com","url":"https:\/\/www.nextcloud.com\/","content_type":null,"http_code":0,"header_size":0,"request_size":0,"filetime":-1,"ssl_verify_result":0,"redirect_count":0,"total_time":14.524799,"namelookup_time":0,"connect_time":0,"pretransfer_time":0,"size_upload":0,"size_download":0,"speed_download":0,"speed_upload":0,"download_content_length":-1,"upload_content_length":-1,"starttransfer_time":0,"redirect_time":0,"redirect_url":"","primary_ip":"","certinfo":[],"primary_port":0,"local_ip":"","local_port":0}]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php","line":103,"function":"finishError","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::","args":[{"__class__":"GuzzleHttp\\Handler\\CurlHandler"},{"sink":{"__class__":"GuzzleHttp\\Psr7\\Stream"},"headers":[],"response":null,"request":{"__class__":"GuzzleHttp\\Psr7\\Request"},"options":{"verify":"\/var\/www\/nextcloud-data\/files_external\/rootcerts.crt","synchronous":true,"handler":{"__class__":"GuzzleHttp\\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false},"errno":6,"onHeadersException":null,"__class__":"GuzzleHttp\\Handler\\EasyHandle"},{"__class__":"GuzzleHttp\\Handler\\CurlFactory"}]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlHandler.php","line":43,"function":"finish","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::","args":[{"__class__":"GuzzleHttp\\Handler\\CurlHandler"},{"sink":{"__class__":"GuzzleHttp\\Psr7\\Stream"},"headers":[],"response":null,"request":{"__class__":"GuzzleHttp\\Psr7\\Request"},"options":{"verify":"\/var\/www\/nextcloud-data\/files_external\/rootcerts.crt","synchronous":true,"handler":{"__class__":"GuzzleHttp\\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false},"errno":6,"onHeadersException":null,"__class__":"GuzzleHttp\\Handler\\EasyHandle"},{"__class__":"GuzzleHttp\\Handler\\CurlFactory"}]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/Proxy.php","line":28,"function":"__invoke","class":"GuzzleHttp\\Handler\\CurlHandler","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/Proxy.php","line":51,"function":"GuzzleHttp\\Handler\\{closure}","class":"GuzzleHttp\\Handler\\Proxy","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/PrepareBodyMiddleware.php","line":37,"function":"GuzzleHttp\\Handler\\{closure}","class":"GuzzleHttp\\Handler\\Proxy","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Middleware.php","line":30,"function":"__invoke","class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/RedirectMiddleware.php","line":70,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Middleware.php","line":59,"function":"__invoke","class":"GuzzleHttp\\RedirectMiddleware","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/HandlerStack.php","line":67,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Client.php","line":277,"function":"__invoke","class":"GuzzleHttp\\HandlerStack","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Client.php","line":125,"function":"transfer","class":"GuzzleHttp\\Client","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Client.php","line":131,"function":"requestAsync","class":"GuzzleHttp\\Client","type":"->","args":["get",{"__class__":"GuzzleHttp\\Psr7\\Uri"},{"verify":"\/var\/www\/nextcloud-data\/files_external\/rootcerts.crt","synchronous":true,"handler":{"__class__":"GuzzleHttp\\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false,"_conditional":{"User-Agent":"GuzzleHttp\/6.2.1 curl\/7.52.1 PHP\/7.0.30-0+deb9u1"}}]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Http\/Client\/Client.php","line":161,"function":"request","class":"GuzzleHttp\\Client","type":"->","args":["get","https:\/\/www.nextcloud.com\/",{"verify":"\/var\/www\/nextcloud-data\/files_external\/rootcerts.crt","synchronous":true}]},{"file":"\/var\/www\/html\/nextcloud\/settings\/Controller\/CheckSetupController.php","line":153,"function":"get","class":"OC\\Http\\Client\\Client","type":"->","args":["https:\/\/www.nextcloud.com\/"]},{"file":"\/var\/www\/html\/nextcloud\/settings\/Controller\/CheckSetupController.php","line":135,"function":"isSiteReachable","class":"OC\\Settings\\Controller\\CheckSetupController","type":"->","args":["www.nextcloud.com"]},{"file":"\/var\/www\/html\/nextcloud\/settings\/Controller\/CheckSetupController.php","line":601,"function":"isInternetConnectionWorking","class":"OC\\Settings\\Controller\\CheckSetupController","type":"->","args":[]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":166,"function":"check","class":"OC\\Settings\\Controller\\CheckSetupController","type":"->","args":[]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Settings\\Controller\\CheckSetupController"},"check"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/App.php","line":118,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Settings\\Controller\\CheckSetupController"},"check"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OC\\Settings\\Controller\\CheckSetupController","check",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"settings.CheckSetup.check"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"settings.CheckSetup.check"}]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Route\/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"settings.CheckSetup.check"}]},{"file":"\/var\/www\/html\/nextcloud\/lib\/base.php","line":989,"function":"match","class":"OC\\Route\\Router","type":"->","args":["\/settings\/ajax\/checksetup"]},{"file":"\/var\/www\/html\/nextcloud\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php","Line":186,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:63.0) Gecko\/20100101 Firefox\/63.0","version":"14.0.0.19"}
{"reqId":"cOHm6y2W36fJZZsqQtUc","level":3,"time":"2018-09-20T17:45:58+00:00","remoteAddr":"192.168.10.230","user":"jibran","app":"internet_connection_check","method":"GET","url":"\/nextcloud\/index.php\/settings\/ajax\/checksetup","message":{"Exception":"GuzzleHttp\\Exception\\ConnectException","Message":"cURL error 6: Could not resolve host: www.startpage.com (see http:\/\/curl.haxx.se\/libcurl\/c\/libcurl-errors.html)","Code":0,"Trace":[{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php","line":150,"function":"createRejection","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::","args":[{"sink":{"__class__":"GuzzleHttp\\Psr7\\Stream"},"headers":[],"response":null,"request":{"__class__":"GuzzleHttp\\Psr7\\Request"},"options":{"verify":"\/var\/www\/nextcloud-data\/files_external\/rootcerts.crt","synchronous":true,"handler":{"__class__":"GuzzleHttp\\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false,"__redirect_count":1},"errno":6,"onHeadersException":null,"__class__":"GuzzleHttp\\Handler\\EasyHandle"},{"errno":6,"error":"Could not resolve host: www.startpage.com","url":"https:\/\/www.startpage.com\/","content_type":null,"http_code":0,"header_size":0,"request_size":0,"filetime":-1,"ssl_verify_result":0,"redirect_count":0,"total_time":24.536956,"namelookup_time":0,"connect_time":0,"pretransfer_time":0,"size_upload":0,"size_download":0,"speed_download":0,"speed_upload":0,"download_content_length":-1,"upload_content_length":-1,"starttransfer_time":0,"redirect_time":0,"redirect_url":"","primary_ip":"","certinfo":[],"primary_port":0,"local_ip":"","local_port":0}]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php","line":103,"function":"finishError","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::","args":[{"__class__":"GuzzleHttp\\Handler\\CurlHandler"},{"sink":{"__class__":"GuzzleHttp\\Psr7\\Stream"},"headers":[],"response":null,"request":{"__class__":"GuzzleHttp\\Psr7\\Request"},"options":{"verify":"\/var\/www\/nextcloud-data\/files_external\/rootcerts.crt","synchronous":true,"handler":{"__class__":"GuzzleHttp\\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false,"__redirect_count":1},"errno":6,"onHeadersException":null,"__class__":"GuzzleHttp\\Handler\\EasyHandle"},{"__class__":"GuzzleHttp\\Handler\\CurlFactory"}]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlHandler.php","line":43,"function":"finish","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::","args":[{"__class__":"GuzzleHttp\\Handler\\CurlHandler"},{"sink":{"__class__":"GuzzleHttp\\Psr7\\Stream"},"headers":[],"response":null,"request":{"__class__":"GuzzleHttp\\Psr7\\Request"},"options":{"verify":"\/var\/www\/nextcloud-data\/files_external\/rootcerts.crt","synchronous":true,"handler":{"__class__":"GuzzleHttp\\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false,"__redirect_count":1},"errno":6,"onHeadersException":null,"__class__":"GuzzleHttp\\Handler\\EasyHandle"},{"__class__":"GuzzleHttp\\Handler\\CurlFactory"}]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/Proxy.php","line":28,"function":"__invoke","class":"GuzzleHttp\\Handler\\CurlHandler","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/Proxy.php","line":51,"function":"GuzzleHttp\\Handler\\{closure}","class":"GuzzleHttp\\Handler\\Proxy","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/PrepareBodyMiddleware.php","line":37,"function":"GuzzleHttp\\Handler\\{closure}","class":"GuzzleHttp\\Handler\\Proxy","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Middleware.php","line":30,"function":"__invoke","class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/RedirectMiddleware.php","line":70,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/RedirectMiddleware.php","line":107,"function":"__invoke","class":"GuzzleHttp\\RedirectMiddleware","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/RedirectMiddleware.php","line":72,"function":"checkRedirect","class":"GuzzleHttp\\RedirectMiddleware","type":"->","args":[{"__class__":"GuzzleHttp\\Psr7\\Request"},"*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/promises\/src\/FulfilledPromise.php","line":39,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\RedirectMiddleware","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/promises\/src\/TaskQueue.php","line":47,"function":"GuzzleHttp\\Promise\\{closure}","class":"GuzzleHttp\\Promise\\FulfilledPromise","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/promises\/src\/Promise.php","line":246,"function":"run","class":"GuzzleHttp\\Promise\\TaskQueue","type":"->","args":[true]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/promises\/src\/Promise.php","line":223,"function":"invokeWaitFn","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/promises\/src\/Promise.php","line":267,"function":"waitIfPending","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/promises\/src\/Promise.php","line":225,"function":"invokeWaitList","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/promises\/src\/Promise.php","line":62,"function":"waitIfPending","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Client.php","line":131,"function":"wait","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Http\/Client\/Client.php","line":161,"function":"request","class":"GuzzleHttp\\Client","type":"->","args":["get","http:\/\/www.startpage.com\/",{"verify":"\/var\/www\/nextcloud-data\/files_external\/rootcerts.crt","synchronous":true}]},{"file":"\/var\/www\/html\/nextcloud\/settings\/Controller\/CheckSetupController.php","line":152,"function":"get","class":"OC\\Http\\Client\\Client","type":"->","args":["http:\/\/www.startpage.com\/"]},{"file":"\/var\/www\/html\/nextcloud\/settings\/Controller\/CheckSetupController.php","line":135,"function":"isSiteReachable","class":"OC\\Settings\\Controller\\CheckSetupController","type":"->","args":["www.startpage.com"]},{"file":"\/var\/www\/html\/nextcloud\/settings\/Controller\/CheckSetupController.php","line":601,"function":"isInternetConnectionWorking","class":"OC\\Settings\\Controller\\CheckSetupController","type":"->","args":[]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":166,"function":"check","class":"OC\\Settings\\Controller\\CheckSetupController","type":"->","args":[]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Settings\\Controller\\CheckSetupController"},"check"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/App.php","line":118,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Settings\\Controller\\CheckSetupController"},"check"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OC\\Settings\\Controller\\CheckSetupController","check",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"settings.CheckSetup.check"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"settings.CheckSetup.check"}]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Route\/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"settings.CheckSetup.check"}]},{"file":"\/var\/www\/html\/nextcloud\/lib\/base.php","line":989,"function":"match","class":"OC\\Route\\Router","type":"->","args":["\/settings\/ajax\/checksetup"]},{"file":"\/var\/www\/html\/nextcloud\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/var\/www\/html\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php","Line":186,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:63.0) Gecko\/20100101 Firefox\/63.0","version":"14.0.0.19"}

Full disclosure: I'm a maintainer of the app in question (bookmarks) and have received this report over here: nextcloud/bookmarks#566

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #2554 (ios dont send Auth basic in header), #8011 (No 'Authorization: Basic' header found), #10390 (HTTP ERROR 500), #9598 (HTTP ERROR 500), and #5413 (HTTP Range header support).

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

As I cannot reproduce the original issue anymore, I will close this ticket. If this is still happening please make sure to upgrade to the latest version. After that, feel free to reopen.

@z3ntu
Copy link

z3ntu commented Sep 2, 2019

I still see this issue on Nextcloud 16.0.4:
e.g. curl -X POST http://localhost:8080/index.php/apps/bookmarks/public/rest/v2/bookmark or curl -X POST http://localhost:8080/index.php/apps/news/api/v1-2/folders

{"reqId":"nrjuDuQUwKZpWBqKKEjC","level":3,"time":"2019-09-02T13:35:06+00:00","remoteAddr":"172.17.0.1","user":"--","app":"PHP","method":"POST","url":"/index.php/apps/bookmarks/public/rest/v2/bookmark","message":"Undefined index: PHP_AUTH_USER at /var/www/html/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php#88","userAgent":"curl/7.65.3","version":"16.0.4.1","id":"5d6d1a8a06e50"}
{"reqId":"nrjuDuQUwKZpWBqKKEjC","level":3,"time":"2019-09-02T13:35:06+00:00","remoteAddr":"172.17.0.1","user":"--","app":"PHP","method":"POST","url":"/index.php/apps/bookmarks/public/rest/v2/bookmark","message":"Undefined index: PHP_AUTH_PW at /var/www/html/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php#89","userAgent":"curl/7.65.3","version":"16.0.4.1","id":"5d6d1a8a06e3b"}

@skjnldsv
Copy link
Member

skjnldsv commented Sep 2, 2019

cc @rullzer

@skjnldsv skjnldsv reopened this Sep 2, 2019
@kesselb
Copy link
Contributor

kesselb commented Sep 2, 2019

Undefined index: PHP_AUTH_USER looks more like #1498 than this issue.

@rullzer rullzer self-assigned this Sep 23, 2019
@ghost ghost added the stale Ticket or PR with no recent activity label Oct 23, 2019
@z3ntu
Copy link

z3ntu commented Oct 23, 2019

Still an issue with the latest Nextcloud release.

@ghost ghost removed the stale Ticket or PR with no recent activity label Oct 23, 2019
@nextcloud nextcloud deleted a comment Oct 23, 2019
@kesselb kesselb added 1. to develop Accepted and waiting to be taken care of 0. Needs triage Pending check for reproducibility or if it fits our roadmap and removed 14-feedback needs info 0. Needs triage Pending check for reproducibility or if it fits our roadmap 1. to develop Accepted and waiting to be taken care of labels Oct 23, 2019
@szaimen
Copy link
Contributor

szaimen commented May 27, 2021

I think this was fixed with #26852. Please reopen if this shouldn't be the case! Thanks! :)

@szaimen szaimen closed this as completed May 27, 2021
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
Projects
None yet
Development

No branches or pull requests

7 participants