Skip to content

Commit

Permalink
Fix - examples: Server-side processing example in data sources direct…
Browse files Browse the repository at this point in the history
…ory wasn't showing the server-side processing script.
  • Loading branch information
Allan Jardine committed Aug 31, 2017
1 parent 576b38e commit d894dc7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .datatables-commit-sync
@@ -1 +1 @@
0d5ae813f255bfb5ef587fc33e86efbb09d91aab
aa849bd98f730afa8b1bd42f78759863e94c9d1a
6 changes: 5 additions & 1 deletion examples/resources/examples.php
@@ -1,8 +1,12 @@
<?php

if ( isset( $_POST['src'] ) && preg_match( '/^scripts\/[a-zA-Z_\-_]+\.php$/', $_POST['src'] ) !== 0 ) {
if ( isset( $_POST['src'] ) && (
preg_match( '/^scripts\/[a-zA-Z_\-_]+\.php$/', $_POST['src'] ) !== 0 ||
preg_match( '/^\.\.\/server_side\/scripts\/[a-zA-Z_\-_]+\.php$/', $_POST['src'] ) !== 0
) ) {
echo htmlspecialchars( file_get_contents( '../server_side/'.$_POST['src'] ) );
}

else {
echo '';
}
Expand Down

0 comments on commit d894dc7

Please sign in to comment.