[GH-ISSUE #380] Host violates local access rules #87

Closed
opened 2026-02-26 05:33:00 +03:00 by kerem · 2 comments
Owner

Originally created by @Shuvi-Hub on GitHub (Sep 2, 2020).
Original GitHub issue: https://github.com/nextcloud/twofactor_gateway/issues/380

I did everything like in the documentary but it never works
This is what the log says...

[index] Error: OCP\Http\Client\LocalServerException: Host violates local access rules at <>

  1. /var/www/nextcloud/lib/private/Http/Client/Client.php line 293
    OC\Http\Client\Client->preventLocalAddress("http://localhost:5000", {body: {to: "+49 ... }})
  2. /var/www/nextcloud/apps/twofactor_gateway/lib/Service/Gateway/Signal/Gateway.php line 70
    OC\Http\Client\Client->post("http://localhost:5000", {body: {to: "+49 ... }})
  3. /var/www/nextcloud/apps/twofactor_gateway/lib/Service/SetupService.php line 92
    OCA\TwoFactorGateway\Service\Gateway\Signal\Gateway->send(OC\User\User {}, "+49174*******", "050421 is your ... .")
  4. /var/www/nextcloud/apps/twofactor_gateway/lib/Controller/SettingsController.php line 90
    OCA\TwoFactorGateway\Service\SetupService->startSetup(OC\User\User {}, "signal", "+49174*******")
  5. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 170
    OCA\TwoFactorGateway\Controller\SettingsController->startVerification("signal", "+49174*******")
  6. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 100
    OC\AppFramework\Http\Dispatcher->executeController(OCA\TwoFactorGat ... {}, "startVerification")
  7. /var/www/nextcloud/lib/private/AppFramework/App.php line 137
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\TwoFactorGat ... {}, "startVerification")
  8. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\TwoFactorG ... r", "startVerification", OC\AppFramework\ ... {}, {gateway: "signa ... "})
  9. <>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({gateway: "signa ... "})
  10. /var/www/nextcloud/lib/private/Route/Router.php line 297
    call_user_func(OC\AppFramework\ ... {}, {gateway: "signa ... "})
  11. /var/www/nextcloud/lib/base.php line 1012
    OC\Route\Router->match("/apps/twofactor ... t")
  12. /var/www/nextcloud/index.php line 37
    OC::handleRequest()

POST /index.php/apps/twofactor_gateway/settings/signal/verification/start

Originally created by @Shuvi-Hub on GitHub (Sep 2, 2020). Original GitHub issue: https://github.com/nextcloud/twofactor_gateway/issues/380 I did everything like in the documentary but it never works This is what the log says... [index] Error: OCP\Http\Client\LocalServerException: Host violates local access rules at <<closure>> 0. /var/www/nextcloud/lib/private/Http/Client/Client.php line 293 OC\Http\Client\Client->preventLocalAddress("http://localhost:5000", {body: {to: "+49 ... }}) 1. /var/www/nextcloud/apps/twofactor_gateway/lib/Service/Gateway/Signal/Gateway.php line 70 OC\Http\Client\Client->post("http://localhost:5000", {body: {to: "+49 ... }}) 2. /var/www/nextcloud/apps/twofactor_gateway/lib/Service/SetupService.php line 92 OCA\TwoFactorGateway\Service\Gateway\Signal\Gateway->send(OC\User\User {}, "+49174*******", "050421 is your ... .") 3. /var/www/nextcloud/apps/twofactor_gateway/lib/Controller/SettingsController.php line 90 OCA\TwoFactorGateway\Service\SetupService->startSetup(OC\User\User {}, "signal", "+49174*******") 4. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 170 OCA\TwoFactorGateway\Controller\SettingsController->startVerification("signal", "+49174*******") 5. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 100 OC\AppFramework\Http\Dispatcher->executeController(OCA\TwoFactorGat ... {}, "startVerification") 6. /var/www/nextcloud/lib/private/AppFramework/App.php line 137 OC\AppFramework\Http\Dispatcher->dispatch(OCA\TwoFactorGat ... {}, "startVerification") 7. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47 OC\AppFramework\App::main("OCA\\TwoFactorG ... r", "startVerification", OC\AppFramework\ ... {}, {gateway: "signa ... "}) 8. <<closure>> OC\AppFramework\Routing\RouteActionHandler->__invoke({gateway: "signa ... "}) 9. /var/www/nextcloud/lib/private/Route/Router.php line 297 call_user_func(OC\AppFramework\ ... {}, {gateway: "signa ... "}) 10. /var/www/nextcloud/lib/base.php line 1012 OC\Route\Router->match("/apps/twofactor ... t") 11. /var/www/nextcloud/index.php line 37 OC::handleRequest() POST /index.php/apps/twofactor_gateway/settings/signal/verification/start
kerem closed this issue 2026-02-26 05:33:00 +03:00
Author
Owner

@ChristophWurst commented on GitHub (Sep 2, 2020):

Try with

‘allow_local_remote_servers’ => true,

in your config/config.php.

<!-- gh-comment-id:685905212 --> @ChristophWurst commented on GitHub (Sep 2, 2020): Try with ``` ‘allow_local_remote_servers’ => true, ``` in your `config/config.php`.
Author
Owner

@Shuvi-Hub commented on GitHub (Sep 2, 2020):

Thx it works now. ^^

<!-- gh-comment-id:685907651 --> @Shuvi-Hub commented on GitHub (Sep 2, 2020): Thx it works now. ^^
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
starred/twofactor_gateway-nextcloud#87
No description provided.