[fix] montage: smaller, secu
This commit is contained in:
parent
f7f6fa25ea
commit
be8354b535
3 changed files with 6 additions and 5 deletions
|
|
@ -311,7 +311,8 @@ $( "#montage" ).on("submit",function(e){
|
|||
div.html( "<a href="+url+" target=_blank>Download "+data["horizontal"]+"x"+data["vertical"]+"</a>")
|
||||
},
|
||||
error: function( data, msg, xhr){
|
||||
console.log( msg)
|
||||
console.log( data)
|
||||
div.html( "<span class=error>Oops... An error occured.")
|
||||
},
|
||||
url: "montage.php",
|
||||
data: data
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ if (strpos($img, 'data:image/png;base64') === 0) {
|
|||
panic("Not a valid image");
|
||||
}
|
||||
$output = $return_code = NULL;
|
||||
exec( __DIR__."/../page_generator.sh ".escapeshellargs($file)." ".escapeshellargs($horizontal)." ".escapeshellargs($vertical)." ".escapeshellargs($landscape) , $output, $return_code);
|
||||
exec( __DIR__."/../page_generator.sh ".escapeshellarg($file)." ".escapeshellarg($horizontal)." ".escapeshellarg($vertical)." ".escapeshellarg($landscape) , $output, $return_code);
|
||||
if( 0 === $return_code ){
|
||||
$pdf = basename(implode("", $output));
|
||||
echo( "https://2020.hackersfest.org/ImageGenerator/a4/".urlencode($pdf) );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue