Skip to content

Commit

Permalink
Escape nonces
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Jan 6, 2025
1 parent a726111 commit bbffb79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/my-calendar-migrate.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function my_calendar_migration() {
?>
<form method="post" action="<?php echo esc_url( admin_url( 'admin.php?page=my-calendar-migrate' ) ); ?>">
<div>
<input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce( 'my-calendar-nonce' ); ?>"/>
<input type="hidden" name="_wpnonce" value="<?php echo esc_attr( wp_create_nonce( 'my-calendar-nonce' ) ); ?>"/>
<input type="hidden" name="import" value="true" />
<input type="hidden" name="source" value="<?php echo $import_source; ?>" />
<?php
Expand Down
2 changes: 1 addition & 1 deletion src/my-calendar-shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ function mc_calendar_generator_fields( $post, $callback_args ) {
<div id="mc-generator" class="generator">
<div class="mc-generator-data">
<?php echo wp_kses_post( wpautop( $message ) ); ?>
<div><input type="hidden" name="_mc_wpnonce" value="<?php echo wp_create_nonce( 'my-calendar-generator' ); ?>"/></div>
<div><input type="hidden" name="_mc_wpnonce" value="<?php echo esc_attr( wp_create_nonce( 'my-calendar-generator' ) ); ?>"/></div>
<input type='hidden' name='shortcode' value='<?php echo esc_attr( $type ); ?>'/>
<?php
// Common Elements to all Shortcodes.
Expand Down

0 comments on commit bbffb79

Please sign in to comment.