Sanitise post id before constructing URL
Fixes: https://github.com/mailpoet/mailpoet/security/code-scanning/17
This commit is contained in:
committed by
Oluwaseun Olorunsola
parent
ca75489ab0
commit
d6415e07e1
@@ -874,7 +874,7 @@ class NewsletterSendComponent extends Component<
|
|||||||
MailPoet.FeaturesController.isSupported(
|
MailPoet.FeaturesController.isSupported(
|
||||||
'gutenberg_email_editor',
|
'gutenberg_email_editor',
|
||||||
) && wpPostId
|
) && wpPostId
|
||||||
? MailPoet.getBlockEmailEditorUrl(wpPostId)
|
? MailPoet.getBlockEmailEditorUrl(Number(wpPostId))
|
||||||
: `?page=mailpoet-newsletter-editor&id=${Number(
|
: `?page=mailpoet-newsletter-editor&id=${Number(
|
||||||
this.props.params.id,
|
this.props.params.id,
|
||||||
)}`
|
)}`
|
||||||
|
Reference in New Issue
Block a user