Skip to content

Commit 28ec349

Browse files
committed
project webhook url escapes
1 parent 71fe68a commit 28ec349

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

app/Domain/Projects/Templates/showProject.tpl.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223
<div class="col-md-4">
224224
<strong><?= $tpl->__('label.webhook_url'); ?></strong><br />
225225
<form action="<?= BASE_URL ?>/projects/showProject/<?php echo $project['id']; ?>#integrations" method="post">
226-
<input type="text" name="mattermostWebhookURL" id="mattermostWebhookURL" value="<?php echo $tpl->get('mattermostWebhookURL'); ?>"/>
226+
<input type="text" name="mattermostWebhookURL" id="mattermostWebhookURL" value="<?php echo $tpl->escape($tpl->get('mattermostWebhookURL')); ?>"/>
227227
<br />
228228
<input type="submit" value="<?= $tpl->__('buttons.save'); ?>" name="mattermostSave" />
229229
</form>
@@ -242,7 +242,7 @@
242242
<div class="col-md-4">
243243
<strong><?= $tpl->__('label.webhook_url'); ?></strong><br />
244244
<form action="<?= BASE_URL ?>/projects/showProject/<?php echo $project['id']; ?>#integrations" method="post">
245-
<input type="text" name="slackWebhookURL" id="slackWebhookURL" value="<?php echo $tpl->get('slackWebhookURL'); ?>"/>
245+
<input type="text" name="slackWebhookURL" id="slackWebhookURL" value="<?php echo $tpl->escape($tpl->get('slackWebhookURL')); ?>"/>
246246
<br />
247247
<input type="submit" value="<?= $tpl->__('buttons.save'); ?>" name="slackSave" />
248248
</form>
@@ -265,16 +265,16 @@
265265
<input type="text" name="zulipURL" id="zulipURL" placeholder="<?= $tpl->__('input.placeholders.zulip_url'); ?>" value="<?php echo $tpl->get('zulipHook')['zulipURL']; ?>"/>
266266
<br />
267267
<strong><?= $tpl->__('label.bot_email'); ?></strong><br />
268-
<input type="text" name="zulipEmail" id="zulipEmail" placeholder="" value="<?php echo $tpl->get('zulipHook')['zulipEmail']; ?>"/>
268+
<input type="text" name="zulipEmail" id="zulipEmail" placeholder="" value="<?php echo $tpl->escape($tpl->get('zulipHook')['zulipEmail']); ?>"/>
269269
<br />
270270
<strong><?= $tpl->__('label.botkey'); ?></strong><br />
271-
<input type="text" name="zulipBotKey" id="zulipBotKey" placeholder="" value="<?php echo $tpl->get('zulipHook')['zulipBotKey']; ?>"/>
271+
<input type="text" name="zulipBotKey" id="zulipBotKey" placeholder="" value="<?php echo $tpl->escape($tpl->get('zulipHook')['zulipBotKey']); ?>"/>
272272
<br />
273273
<strong><?= $tpl->__('label.stream'); ?></strong><br />
274-
<input type="text" name="zulipStream" id="zulipStream" placeholder="" value="<?php echo $tpl->get('zulipHook')['zulipStream']; ?>"/>
274+
<input type="text" name="zulipStream" id="zulipStream" placeholder="" value="<?php echo $tpl->escape($tpl->get('zulipHook')['zulipStream']); ?>"/>
275275
<br />
276276
<strong><?= $tpl->__('label.topic'); ?></strong><br />
277-
<input type="text" name="zulipTopic" id="zulipTopic" placeholder="" value="<?php echo $tpl->get('zulipHook')['zulipTopic']; ?>"/>
277+
<input type="text" name="zulipTopic" id="zulipTopic" placeholder="" value="<?php echo $tpl->escape($tpl->get('zulipHook')['zulipTopic']); ?>"/>
278278
<br />
279279
<input type="submit" value="<?= $tpl->__('buttons.save'); ?>" name="zulipSave" />
280280
</form>
@@ -295,7 +295,7 @@
295295
<strong><?= $tpl->__('label.webhook_url'); ?></strong><br/>
296296
<form action="<?= BASE_URL ?>/projects/showProject/<?php echo $project['id']; ?>#integrations" method="post">
297297
<?php for ($i = 1; $i <= 3; $i++) { ?>
298-
<input type="text" name="discordWebhookURL<?= $i; ?>" id="discordWebhookURL<?= $i; ?>" placeholder="<?= $tpl->__('input.placeholders.discord_url'); ?>" value="<?php echo $tpl->get('discordWebhookURL'.$i); ?>"/><br/>
298+
<input type="text" name="discordWebhookURL<?= $i; ?>" id="discordWebhookURL<?= $i; ?>" placeholder="<?= $tpl->__('input.placeholders.discord_url'); ?>" value="<?php echo $tpl->escape($tpl->get('discordWebhookURL'.$i)); ?>"/><br/>
299299
<?php } ?>
300300
<input type="submit" value="<?= $tpl->__('buttons.save'); ?>" name="discordSave"/>
301301
</form>

0 commit comments

Comments
 (0)