Skip to content

Commit 8bc8ddb

Browse files
authored
Merge pull request #7 from HelloAsso/sec/ifram-xss
Sec/iframe xss
2 parents 058600b + 74accf9 commit 8bc8ddb

4 files changed

Lines changed: 13 additions & 7 deletions

File tree

README.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Tags: helloasso, paiement, association, crowdfunding, don
55
Requires at least: 4.0
66
Tested up to: 6.4.3
77
Requires PHP: 7.2.34
8-
Stable tag: 1.1.9
8+
Stable tag: 1.1.10
99
License: GPLv2 or later
1010
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1111

@@ -81,6 +81,9 @@ https://www.youtube.com/watch?v=Bjaqc_Yun8g
8181

8282
== Changelog ==
8383

84+
= 1.1.10 =
85+
* Correction d'une faille XSS possible sur l'insertion de l'iframe
86+
8487
= 1.1.9 =
8588
* Ajout de la possibilité de spécifier une hauteur dans le shortcode afin de voir les formulaires de don en entier.
8689
* Correction d'un bug provoquant une erreur critique lors de la liaison d'une assication sans campagne.

admin/view/template/footer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
<path fill="url(#SVGID_3_)" d="M13.5 8.1c11.9-1.3 25.4 11 23.7 13.9 3.3-5.8 4.1-15.1-7.5-20.4C18.6-2.9 6 2.5 1.6 13.7.2 17.2-.3 21 .2 24.7-.6 11.9 9.1 8.5 13.5 8.1z"/>
2222
</svg>
2323

24-
<div class="ha-copyright">Tous droits réservés © <?= esc_html(date('Y')); ?> - HelloAsso for Wordpress v1.1.9</div>
24+
<div class="ha-copyright">Tous droits réservés © <?= esc_html(date('Y')); ?> - HelloAsso for Wordpress v10</div>
2525
</div>

hello-asso.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Plugin Name: HelloAsso
1717
* Plugin URI: https://centredaide.helloasso.com/s/article/paiement-en-ligne-wordpress-integrer-vos-campagnes-helloasso
1818
* Description: HelloAsso est la solution gratuite des associations pour collecter des paiements et des dons sur internet.
19-
* Version: 1.1.9
19+
* Version: 1.1.10
2020
* Author: HelloAsso
2121
* Author URI: https://helloasso.com
2222
* License: GPL-2.0+
@@ -36,7 +36,7 @@
3636
* Start at version 1.0.0 and use SemVer - https://semver.org
3737
* Rename this for your plugin and update it as you release new versions.
3838
*/
39-
define('HELLO_ASSO_VERSION', '1.1.9');
39+
define('HELLO_ASSO_VERSION', '1.1.10');
4040

4141
/**
4242
* The code that runs during plugin activation.

public/class-hello-asso-public.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,24 +110,27 @@ function ha_shortcode($atts)
110110
$type = $atts['type'];
111111
$allowed_styles = array(
112112
'style' => array(
113+
'width' => array(),
113114
'height' => array(),
114115
'border' => array(),
115116
),
116117
);
117118

119+
$pattern = '/^\d+px$/';
120+
118121
if($type == "widget-bouton")
119122
{
120-
$height = $atts['height'] ?? "70px";
123+
$height = preg_match($pattern, $atts['height'] ?? 0) ? $atts['height'] : "70px";
121124
$styleIframe = 'style="width:200px; height:'. $height . '; border:none;"';
122125
}
123126
else if($type == "widget")
124127
{
125-
$height = $atts['height'] ?? "750px";
128+
$height = preg_match($pattern, $atts['height'] ?? 0) ? $atts['height'] : "750px";
126129
$styleIframe = 'style="width:100%; height:'. $height . '; border:none;"';
127130
}
128131
else if($type == "widget-vignette")
129132
{
130-
$height = $atts['height'] ?? "450px";
133+
$height = preg_match($pattern, $atts['height'] ?? 0) ? $atts['height'] : "450px";
131134
$styleIframe = 'style="width:350px; height:'. $height . '; border:none;"';
132135
}
133136

0 commit comments

Comments
 (0)