Skip to content

Commit 2a71a40

Browse files
committed
sanitize the form export file name
1 parent 3a9954c commit 2a71a40

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

includes/class-gf-cli-form.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ function export( $args, $assoc_args ) {
147147
$filename = 'gravityforms-export-' . date( 'Y-m-d' ) . '.json';
148148
}
149149

150+
$filename = sanitize_file_name( $filename );
151+
150152
// If the export directory is set
151153
if ( isset( $assoc_args['dir'] ) ) {
152154
// If the directory isn't writable, throw an error

0 commit comments

Comments
 (0)