Author |
|
solkmaaker Senior Member
Joined: 28 June 2020
Online Status: Offline Posts: 163
|
Posted: 12 February 2021 at 2:02pm | IP Logged
|
|
|
Hi
This is not a new thing (currently running version 8.6.0), it has been like this for a while (at least 3 versions back, maybe more)
Code:
[21:52:31.58][00e46e6d] [POST(4)][ip:XX.XX.XX.XX] /?/Api/
[21:52:31.58][00e46e6d] POST > [Module, Method, Parameters, TenantName]
[21:52:31.58][00e46e6d]
[21:52:31.58][00e46e6d] Exception: ApiException
|
|
|
Error comes even when i just load login page to browser, no need to log in to get error.
Any ideas what that might be?
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 14 February 2021 at 10:22pm | IP Logged
|
|
|
Per this documentation page, API exceptions recorded in the logs don't include stack trace as it may be containing sensitive data such as passwords in plain text, so the only thing recorded in the logs is "ApiException" message. And for troubleshooting purposes, you need to enable recording stack trace, that's done by setting LogStackTrace to true in data/settings/config.json configuration file. Once that's done, error logs should include complete stack trace which should help determining the actual reason of the issue.
--
Regards,
Igor, Afterlogic Support
|
Back to Top |
|
|
solkmaaker Senior Member
Joined: 28 June 2020
Online Status: Offline Posts: 163
|
Posted: 15 February 2021 at 12:09am | IP Logged
|
|
|
Thank you
Code:
[07:55:15.55][53ccc7f8] [POST(4)][ip:XXX.XXX.XXX.XXX] /?/Api/
[07:55:15.55][53ccc7f8] POST > [Module, Method, Parameters, TenantName]
[07:55:15.55][53ccc7f8]
[07:55:15.55][53ccc7f8] Aurora\System\Exceptions\ApiException: ApiException in /var/www/system/Api.php:1137
Stack trace:
#0 /var/www/modules/OpenPgpWebclient/Module.php(367): Aurora\System\Api::checkUserRoleIsAtLeast(2)
#1 [internal function]: Aurora\Modules\OpenPgpWebclient\Module->GetPublicKeysFromContacts(0)
#2 /var/www/system/Module/AbstractModule.php(827): call_user_func_array(Array, Array)
#3 /var/www/modules/Core/Module.php(642): Aurora\System\Module\AbstractModule->CallMethod('GetPublicKeysFr...', Array, true)
#4 [internal function]: Aurora\Modules\Core\Module->EntryApi()
#5 /var/www/system/Router.php(108): call_user_func_array(Array, Array)
#6 /var/www/system/Module/Manager.php(634): Aurora\System\Router->route('api')
#7 /var/www/system/Application.php(137): Aurora\System\Module\Manager->RunEntry('api')
#8 /var/www/system/Application.php(108): Aurora\System\Application->Route('api')
#9 /var/www/index.php(21): Aurora\System\Application::Start()
#10 {main}
Next Aurora\System\Exceptions\ApiException: ApiException in /var/www/system/Module/AbstractModule.php:879
Stack trace:
#0 /var/www/modules/Core/Module.php(642): Aurora\System\Module\AbstractModule->CallMethod('GetPublicKeysFr...', Array, true)
#1 [internal function]: Aurora\Modules\Core\Module->EntryApi()
#2 /var/www/system/Router.php(108): call_user_func_array(Array, Array)
#3 /var/www/system/Module/Manager.php(634): Aurora\System\Router->route('api')
#4 /var/www/system/Application.php(137): Aurora\System\Module\Manager->RunEntry('api')
#5 /var/www/system/Application.php(108): Aurora\System\Application->Route('api')
#6 /var/www/index.php(21): Aurora\System\Application::Start()
#7 {main}
|
|
|
Hmm, this block of API code seems to throw exception in case user has no role. And reason for checking seems to be OpenPgpWebclient module.
If i disable OpenPgpWebclient module, then everything is ok.
OpenPgpWebclient seems to check user role too early.
Bug?
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 15 February 2021 at 1:11am | IP Logged
|
|
|
Yes that looks like a bug, I've reported it to the developers. Thank you.
--
Regards,
Igor, Afterlogic Support
|
Back to Top |
|
|