doctrine/couchdb-odm — Issue #30: providing invalid credentials ends in an infinite loop
Author: janpieper
Created: 2011-11-04 22:42:31+00:00
State: open

There is no handling for invalid credentials in `Doctrine\CouchDB\HTTP\SocketClient.php` so it ends in an infinite loop.

# Time Memory Function Location
-----------------------------------------------------------------------------------------------------------------------
1 0.0007 650752 {main}( ) ../app_dev.php:0
2 0.0259 5910352 Symfony\Component\HttpKernel\Kernel->handle( ) ../app_dev.php:24
3 0.0450 8872896 Symfony\Bundle\FrameworkBundle\HttpKernel->handle( ) ../bootstrap.php.cache:547
4 0.0451 8873904 Symfony\Component\HttpKernel\HttpKernel->handle( ) ../classes.php:5013
5 0.0451 8873904 Symfony\Component\HttpKernel\HttpKernel->handleRaw( ) ../classes.php:4040
6 0.0698 12040336 call_user_func_array ( ) ../classes.php:4070
7 0.0698 12040704 My\DummyBundle\Controller\IndexController->indexAction( ) ../classes.php:4070
8 0.0757 13437232 Doctrine\ODM\CouchDB\DocumentManager->persist( ) ../IndexController.php:87
9 0.0757 13437232 Doctrine\ODM\CouchDB\UnitOfWork->scheduleInsert( ) ../DocumentManager.php:257
10 0.0757 13437544 Doctrine\ODM\CouchDB\UnitOfWork->doScheduleInsert( ) ../UnitOfWork.php:301
11 0.0823 13901792 Doctrine\ODM\CouchDB\UnitOfWork->persistNew( ) ../UnitOfWork.php:317
12 0.0825 13928200 Doctrine\ODM\CouchDB\Id\CouchUUIDGenerator->generate( ) ../UnitOfWork.php:965
13 0.0825 13928200 Doctrine\CouchDB\CouchDBClient->getUuids( ) ../CouchUUIDGenerator.php:41
14 0.0825 13928568 Doctrine\CouchDB\HTTP\LoggingClient->request( ) ../CouchDBClient.php:129
15 0.0826 13928808 Doctrine\CouchDB\HTTP\SocketClient->request( ) ../LoggingClient.php:65
16 0.0858 13942904 Doctrine\CouchDB\HTTP\SocketClient->request( ) ../SocketClient.php:249
17 0.0883 13948056 Doctrine\CouchDB\HTTP\SocketClient->request( ) ../SocketClient.php:249
18 0.0916 13953208 Doctrine\CouchDB\HTTP\SocketClient->request( ) ../SocketClient.php:249
19 0.0963 13958384 Doctrine\CouchDB\HTTP\SocketClient->request( ) ../SocketClient.php:249
20 0.1003 13963536 Doctrine\CouchDB\HTTP\SocketClient->request( ) ../SocketClient.php:249
...
295 0.9438 16428080 Doctrine\CouchDB\HTTP\SocketClient->request( ) ../SocketClient.php:249
296 0.9458 16433232 Doctrine\CouchDB\HTTP\SocketClient->request( ) ../SocketClient.php:249
297 0.9477 16438384 Doctrine\CouchDB\HTTP\SocketClient->request( ) ../SocketClient.php:249
298 0.9497 16443536 Doctrine\CouchDB\HTTP\SocketClient->request( ) ../SocketClient.php:249
299 0.9497 16443536 Doctrine\CouchDB\HTTP\SocketClient->buildRequest( ) ../SocketClient.php:133

The `$body` variable contains the following JSON:

{"error":"unauthorized","reason":"Name or password is incorrect."}