Skip to content

Commit 802e019

Browse files
committed
check if widget value correct to avoid injection
1 parent 719562e commit 802e019

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

admin/js/hello-asso-admin.js

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/class-hello-asso-public.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@ function ha_shortcode($atts)
132132
{
133133
$height = preg_match($pattern, $atts['height'] ?? 0) ? $atts['height'] : "450px";
134134
$styleIframe = 'style="width:350px; height:'. $height . '; border:none;"';
135+
} else {
136+
$type = "";
137+
}
138+
139+
if(!str_starts_with($url, "https://www.helloasso.com/")) {
140+
$url = "";
135141
}
136142

137143
ob_start();

0 commit comments

Comments
 (0)