Skip to content

Commit

Permalink
Merge pull request #8 from phpform-dev/check-token-protection-for-war…
Browse files Browse the repository at this point in the history
…ning-icon

Check both reCaptcha and token/secret for showing warning about missi…
  • Loading branch information
phpform-dev authored Feb 22, 2024
2 parents f9141a7 + 534fa5a commit da086a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Admin/Resources/templates/forms/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
</a>
{% endif %}
{% if app.user.isSuperUser %}
{% if (form.recaptchaToken|length == 0) %}
<a class="tag is-danger is-light ml-1" title="Not protected!" href="{{ path('admin_forms_edit', { id: form.id }) }}">
{% if (form.recaptchaToken|length == 0 and form.secret|length == 0) %}
<a class="tag is-danger is-light ml-1" title="Please use token or reCaptcha protection" href="{{ path('admin_forms_token', { id: form.id }) }}">
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" style="width: 16px; height: 16px; fill: hsl(348, 100%, 61%);">
<path d="M21.171,15.398l-5.912-9.854C14.483,4.251,13.296,3.511,12,3.511s-2.483,0.74-3.259,2.031l-5.912,9.856 c-0.786,1.309-0.872,2.705-0.235,3.83C3.23,20.354,4.472,21,6,21h12c1.528,0,2.77-0.646,3.406-1.771 C22.043,18.104,21.957,16.708,21.171,15.398z M12,17.549c-0.854,0-1.55-0.695-1.55-1.549c0-0.855,0.695-1.551,1.55-1.551 s1.55,0.696,1.55,1.551C13.55,16.854,12.854,17.549,12,17.549z M13.633,10.125c-0.011,0.031-1.401,3.468-1.401,3.468 c-0.038,0.094-0.13,0.156-0.231,0.156s-0.193-0.062-0.231-0.156l-1.391-3.438C10.289,9.922,10.25,9.712,10.25,9.5 c0-0.965,0.785-1.75,1.75-1.75s1.75,0.785,1.75,1.75C13.75,9.712,13.711,9.922,13.633,10.125z"/>
</svg>
Expand Down

0 comments on commit da086a0

Please sign in to comment.