Skip to content

Commit

Permalink
Merge pull request #56 from humhub/fix/53-script-qr-code
Browse files Browse the repository at this point in the history
Fix initialize of inline script of QR code
  • Loading branch information
luke- authored Jun 8, 2023
2 parents e2c6f45 + fe27207 commit 04ee8c5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

1.1.3 (June 8, 2023)
--------------------
- Fix #53: Fix initialize of inline script of QR code

1.1.2 (May 17, 2023)
-------------------
- Fix #55: Don't send a verification code when trusted IP address
Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"resources/screen2.png",
"resources/screen3.png"
],
"version": "1.1.2",
"version": "1.1.3",
"humhub": {
"minVersion": "1.11"
}
Expand Down
5 changes: 3 additions & 2 deletions views/config/userGoogleAuthenticatorCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* @license https://www.humhub.com/licences
*/

use humhub\libs\Html;
use humhub\modules\twofa\helpers\TwofaHelper;

/* @var $qrCodeText string */
Expand Down Expand Up @@ -39,7 +40,7 @@
</div>
</div>

<script>
<script <?= Html::nonce() ?>>
$(document).ready(function(){
if ($('#twofa-google-auth-qrcode').html() === '') {
new QRCode('twofa-google-auth-qrcode', {
Expand All @@ -54,4 +55,4 @@
$('input[name="GoogleAuthenticatorUserSettings[changeSecretCode]"]').val(1);
<?php endif; ?>
})
</script>
</script>

0 comments on commit 04ee8c5

Please sign in to comment.