Slim Application Error when @ in search string #76

Closed
opened 2021-06-21 00:06:58 +02:00 by AlfredSK · 4 comments
AlfredSK commented 2021-06-21 00:06:58 +02:00 (Migrated from github.com)

The directory is throwing a 'Slim Application Error' when the search string contains an @.

Example 1: Go to the directory page. Open the search field. Search for support@libranet.de or some other webfinger address.

Example 2: Configure Friendica node to use the global directory for searching users. Search for support@libranet.de or some other webfinger address in Friendica itself.

The directory is throwing a 'Slim Application Error' when the search string contains an `@`. Example 1: Go to the directory page. Open the search field. Search for `support@libranet.de` or some other webfinger address. Example 2: Configure Friendica node to use the global directory for searching users. Search for `support@libranet.de` or some other webfinger address in Friendica itself.
MrPetovan commented 2021-06-21 01:59:49 +02:00 (Migrated from github.com)

Thank you for the report!

Thank you for the report!
AlfredSK commented 2021-06-21 08:49:28 +02:00 (Migrated from github.com)

This is something an admin reported. I could reproduce the issue with the search on dir.friendica.social and dir.libranet.de.

I can provide the full error message If necessary as soon as I am home.

This is something an admin reported. I could reproduce the issue with the search on dir.friendica.social and dir.libranet.de. I can provide the full error message If necessary as soon as I am home.
AlfredSK commented 2021-06-21 19:12:08 +02:00 (Migrated from github.com)

Just for the record because you already fixed it. Thank you!

Slim Application Error:
Type: PDOException
Code: 42000
Message: SQLSTATE[42000]: Syntax error or access violation: 1064 syntax error, unexpected '@', expecting $end
File: .../vendor/atlas/pdo/src/Connection.php
Line: 138
Trace: #0 .../vendor/atlas/pdo/src/Connection.php(138): PDOStatement->execute()
#1 .../vendor/atlas/pdo/src/Connection.php(186): Atlas\Pdo\Connection->perform()
#2 .../src/classes/Views/Widget/AccountTypeTabs.php(44): Atlas\Pdo\Connection->fetchAll()
#3 .../src/classes/Controllers/Web/Search.php(82): Friendica\Directory\Views\Widget\AccountTypeTabs->render()
#4 .../src/classes/Routes/Web/BaseRoute.php(39): Friendica\Directory\Controllers\Web\Search->render()
#5 .../src/routes.php(22): Friendica\Directory\Routes\Web\BaseRoute->__invoke()
#6 [internal function]: Closure->{closure}()
#7 .../vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func()
#8 .../vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke()
#9 .../vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->__invoke()
#10 .../vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack()
#11 .../vendor/slim/slim/Slim/App.php(503): Slim\Route->run()
#12 .../vendor/gofabian/negotiation-middleware/src/NegotiationMiddleware.php(81): Slim\App->__invoke()
#13 [internal function]: Gofabian\Negotiation\NegotiationMiddleware->__invoke()
#14 .../vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array()
#15 [internal function]: Slim\DeferredCallable->__invoke()
#16 .../vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func()
#17 .../vendor/boronczyk/localization-middleware/src/LocalizationMiddleware.php(166): Slim\App->Slim\{closure}()
#18 [internal function]: Boronczyk\LocalizationMiddleware->__invoke()
#19 .../vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array()
#20 [internal function]: Slim\DeferredCallable->__invoke()
#21 .../vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func()
#22 .../src/classes/Middleware/ZrlMiddleware.php(38): Slim\App->Slim\{closure}()
#23 [internal function]: Friendica\Directory\Middleware\ZrlMiddleware->__invoke()
#24 .../vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array()
#25 [internal function]: Slim\DeferredCallable->__invoke()
#26 .../vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func()
#27 .../vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim\{closure}()
#28 .../vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack()
#29 .../vendor/slim/slim/Slim/App.php(297): Slim\App->process()
#30 .../public/index.php(36): Slim\App->run()
#31 {main}
Just for the record because you already fixed it. Thank you! ``` Slim Application Error: Type: PDOException Code: 42000 Message: SQLSTATE[42000]: Syntax error or access violation: 1064 syntax error, unexpected '@', expecting $end File: .../vendor/atlas/pdo/src/Connection.php Line: 138 Trace: #0 .../vendor/atlas/pdo/src/Connection.php(138): PDOStatement->execute() #1 .../vendor/atlas/pdo/src/Connection.php(186): Atlas\Pdo\Connection->perform() #2 .../src/classes/Views/Widget/AccountTypeTabs.php(44): Atlas\Pdo\Connection->fetchAll() #3 .../src/classes/Controllers/Web/Search.php(82): Friendica\Directory\Views\Widget\AccountTypeTabs->render() #4 .../src/classes/Routes/Web/BaseRoute.php(39): Friendica\Directory\Controllers\Web\Search->render() #5 .../src/routes.php(22): Friendica\Directory\Routes\Web\BaseRoute->__invoke() #6 [internal function]: Closure->{closure}() #7 .../vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func() #8 .../vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke() #9 .../vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->__invoke() #10 .../vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack() #11 .../vendor/slim/slim/Slim/App.php(503): Slim\Route->run() #12 .../vendor/gofabian/negotiation-middleware/src/NegotiationMiddleware.php(81): Slim\App->__invoke() #13 [internal function]: Gofabian\Negotiation\NegotiationMiddleware->__invoke() #14 .../vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array() #15 [internal function]: Slim\DeferredCallable->__invoke() #16 .../vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func() #17 .../vendor/boronczyk/localization-middleware/src/LocalizationMiddleware.php(166): Slim\App->Slim\{closure}() #18 [internal function]: Boronczyk\LocalizationMiddleware->__invoke() #19 .../vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array() #20 [internal function]: Slim\DeferredCallable->__invoke() #21 .../vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func() #22 .../src/classes/Middleware/ZrlMiddleware.php(38): Slim\App->Slim\{closure}() #23 [internal function]: Friendica\Directory\Middleware\ZrlMiddleware->__invoke() #24 .../vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array() #25 [internal function]: Slim\DeferredCallable->__invoke() #26 .../vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func() #27 .../vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim\{closure}() #28 .../vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack() #29 .../vendor/slim/slim/Slim/App.php(297): Slim\App->process() #30 .../public/index.php(36): Slim\App->run() #31 {main} ```
MrPetovan commented 2021-06-22 16:18:12 +02:00 (Migrated from github.com)

I updated dir.friendica.social with the fix.

I updated `dir.friendica.social` with the fix.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: friendica/friendica-directory#76
No description provided.