Browse Source

Fix #1452 Use a textNode to change password to automatically escape the characters

pull/1456/head
Timothée Jaussoin 3 months ago
parent
commit
96c94c5021
  1. 1
      CHANGELOG.md
  2. 2
      app/Widgets/Account/Account.php
  3. 12
      composer.lock
  4. 10
      src/Moxl/Stanza/Register.php

1
CHANGELOG.md

@ -19,6 +19,7 @@ v0.31 (master)
* Add a little helper in the Publish widget when publishing publicly and the blog is configured on presence
* Add SDP to Jingle and Jingle to SDP debug tool
* Check the required PHP extensions before starting the daemon
* Fix #1452 Use a textNode to change password to automatically escape the characters
v0.30.1
---------------------------

2
app/Widgets/Account/Account.php

@ -109,7 +109,7 @@ class Account extends \Movim\Widget\Base
{
$p1 = $form->password->value;
$p2 = $form->password_confirmation->value;
\logDebug($p1);
if ($p1 == $p2) {
$arr = explodeJid($this->user->id);

12
composer.lock

@ -2515,16 +2515,16 @@
},
{
"name": "league/commonmark",
"version": "2.7.0",
"version": "2.7.1",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/commonmark.git",
"reference": "6fbb36d44824ed4091adbcf4c7d4a3923cdb3405"
"reference": "10732241927d3971d28e7ea7b5712721fa2296ca"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/6fbb36d44824ed4091adbcf4c7d4a3923cdb3405",
"reference": "6fbb36d44824ed4091adbcf4c7d4a3923cdb3405",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/10732241927d3971d28e7ea7b5712721fa2296ca",
"reference": "10732241927d3971d28e7ea7b5712721fa2296ca",
"shasum": ""
},
"require": {
@ -2553,7 +2553,7 @@
"symfony/process": "^5.4 | ^6.0 | ^7.0",
"symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 | ^7.0",
"unleashedtech/php-coding-standard": "^3.1.1",
"vimeo/psalm": "^4.24.0 || ^5.0.0"
"vimeo/psalm": "^4.24.0 || ^5.0.0 || ^6.0.0"
},
"suggest": {
"symfony/yaml": "v2.3+ required if using the Front Matter extension"
@ -2618,7 +2618,7 @@
"type": "tidelift"
}
],
"time": "2025-05-05T12:20:28+00:00"
"time": "2025-07-20T12:47:49+00:00"
},
{
"name": "league/config",

10
src/Moxl/Stanza/Register.php

@ -47,8 +47,14 @@ class Register
{
$dom = new \DOMDocument('1.0', 'UTF-8');
$query = $dom->createElementNS('jabber:iq:register', 'query');
$query->appendChild($dom->createElement('username', $username));
$query->appendChild($dom->createElement('password', $password));
$usernameNode = $dom->createElement('username');
$usernameNode->appendChild($dom->createTextNode($username));
$query->appendChild($usernameNode);
$passwordNode = $dom->createElement('password');
$passwordNode->appendChild($dom->createTextNode($password));
$query->appendChild($passwordNode);
\Moxl\API::request(\Moxl\API::iqWrapper($query, $to, 'set'));
}

Loading…
Cancel
Save