- Issue created by @the_g_bomb
- Assigned to i-trokhanenko
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 12:28pm 5 May 2023 - πΊπ¦Ukraine i-trokhanenko Lutsk πΊπ¦
Injected a
StringTranslationTrait
service to theSiteGuardianService
and made some strings translatable.
I haven't touched the logger messages because usually the Drupal community doesn't translate errors/warnings/notices.
Please review the patch. - π¬π§United Kingdom the_g_bomb
Patch looks good to me, will try to give it a more in depth look asap. Thank you
- Assigned to seeduardo
- First commit to issue fork.
- Issue was unassigned.
- πΊπ¦Ukraine i-trokhanenko Lutsk πΊπ¦
Injected a
TranslationInterface
toSiteGuardianService
Please review patch #8 - Status changed to Needs work
over 1 year ago 8:53pm 8 May 2023 - π¬π§United Kingdom the_g_bomb
Seeing problems now when I try to access the endpoints at:
/admin/config/development/site_guardian/endpointsPath: /site_guardian/enabled_modules_and_updates?site_guardian_key=pPRsS080_LgN6Z3x1jt5Gu-AogzHUo80hylFW1Z9nXEVG926tnuLEoxEPBf22y1hYh4JicwGEA. Drupal\Core\Http\Exception\CacheableAccessDeniedHttpException: in Drupal\Core\Routing\AccessAwareRouter->checkAccess() (line 118 of /var/www/html/docroot/core/lib/Drupal/Core/Routing/AccessAwareRouter.php).
I suspect it has something to do with the fact that the accessCheck in the service SiteGuardianService.php is using the 'Checks passed' string which is now being translated in the checkActivationAndSiteGuardianKey method.
I wonder if instead of doing:
return $this->t('Checks passed');
it might be better to just do:
return TRUE
then check for the TRUE instead of a String. - @the_g_bomb opened merge request.
- Status changed to Needs review
over 1 year ago 8:29am 19 May 2023 - π¬π§United Kingdom the_g_bomb
I am not wanting to hold up this ticket, but I was wondering if the code could be improved here as well.
$saved_key = $this->settings->get('site_guardian_key'); if ($saved_key && (empty($site_guardian_key) || $site_guardian_key != $saved_key)) { \Drupal::logger('site_guardian')->warning("Site Guardian request received with an incorrect key, access was denied."); return FALSE; }
It could become
$saved_key = $this->getKey('); if (!empty($saved_key) || !empty($site_guardian_key) || ($site_guardian_key != $saved_key)) { \Drupal::logger('site_guardian')->warning("Site Guardian request received with an incorrect key, access was denied."); return FALSE; }
- Status changed to RTBC
over 1 year ago 10:04am 19 May 2023 - πΊπ¦Ukraine i-trokhanenko Lutsk πΊπ¦
MR#1 works fine on Drupal 9.5.8 and Drupal 10.0.8. Checked with simplytest.me. Marking as RTBC. Thanks!
Also checked with simplytest.me, code looks good too, thanks both.
-
seeduardo β
committed f1640bfd on 1.0.x authored by
the_g_bomb β
Issue #3358397 by the_g_bomb, seeduardo, i-trokhanenko: Inject and allow...
-
seeduardo β
committed f1640bfd on 1.0.x authored by
the_g_bomb β
- Status changed to Fixed
over 1 year ago 10:11am 19 May 2023 Automatically closed - issue fixed for 2 weeks with no activity.