Skip to content

Commit

Permalink
Add form security token
Browse files Browse the repository at this point in the history
  • Loading branch information
cproensa committed Jan 13, 2017
1 parent e212cf1 commit 2fe20c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions manage_filter_edit_page.php
Expand Up @@ -95,6 +95,7 @@
<form method="post" name="filters" id="filters_form_open" action="<?php echo $t_action; ?>">
<input type="hidden" name="filter_id" value="<?php echo $f_filter_id ?>" >
<input type="hidden" name="view_type" value="<?php echo $t_filter['_view_type'] ?>" >
<?php echo form_security_field( 'manage_filter_edit_update' ) ?>

<div class="widget-box widget-color-blue2">
<div class="widget-header widget-header-small">
Expand Down
4 changes: 4 additions & 0 deletions manage_filter_edit_update.php
Expand Up @@ -28,6 +28,8 @@
require_once( 'core.php' );
require_api( 'filter_api.php' );

form_security_validate( 'manage_filter_edit_update' );

auth_ensure_user_authenticated();

$t_errors = array();
Expand Down Expand Up @@ -89,6 +91,8 @@

$t_filter = filter_gpc_get( $t_filter );

form_security_purge( 'manage_filter_edit_update' );

if( empty( $t_errors ) ) {
filter_db_update_filter( $f_filter_id, filter_serialize( $t_filter ), $f_project_id, $f_is_public, $f_filter_name );
print_header_redirect( 'manage_filter_page.php' );
Expand Down

0 comments on commit 2fe20c0

Please sign in to comment.