Skip to content
Snippets Groups Projects

Issue #3524332: captcha_point_load($id) need to validate the $id

Issue #3524332: captcha_point_load($id) need to validate the $id

Closes #3524332

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
57 57 * An instance of an captcha_point entity.
58 58 */
59 59 function captcha_point_load($id) {
60 return CaptchaPoint::load($id);
60
61 if(empty($id) || !is_string($id)) {
62 return NULL;
63 }
64
65 try {
66 return CaptchaPoint::load($id);
67 }
68 catch (\Exception $e) {
69 \Drupal::logger('captcha')->error('Failed to load captcha point: @error', ['@error' => $e->getMessage()]);
Please register or sign in to reply
Loading