]> git.p6c8.net - jirafeau.git/blobdiff - index.php
Centralize legacy mcrypt decryption in `jirafeau_decrypt_file_legacy()`
[jirafeau.git] / index.php
index 24ce25c48237af1baed5e5a5c5fee38b8b5a97bc..24565bdc3d64c81f56c509a6e0c33568fe084950 100644 (file)
--- a/index.php
+++ b/index.php
@@ -26,7 +26,7 @@ require(JIRAFEAU_ROOT . 'lib/functions.php');
 require(JIRAFEAU_ROOT . 'lib/lang.php');
 
 if ($cfg['download_password_requirement'] === "generated"){
 require(JIRAFEAU_ROOT . 'lib/lang.php');
 
 if ($cfg['download_password_requirement'] === "generated"){
-    $download_pass = jirafeau_gen_download_pass();
+    $download_pass = jirafeau_gen_download_pass($cfg['download_password_gen_len'], $cfg['download_password_gen_chars']);
 }
 
 check_errors($cfg);
 }
 
 check_errors($cfg);
@@ -177,7 +177,12 @@ elseif (true === jirafeau_challenge_upload_ip($cfg, get_ip_address($cfg))) {
 </div>
 
 <div id="upload">
 </div>
 
 <div id="upload">
-<fieldset>
+<form id="upload-form" onsubmit="
+            event.preventDefault();
+            document.getElementById('upload').style.display = 'none';
+            document.getElementById('uploading').style.display = '';
+            upload (<?php echo jirafeau_get_max_upload_chunk_size_bytes($cfg['max_upload_chunk_size_bytes']); ?>);
+            "><fieldset>
     <legend>
     <?php echo t('SEL_FILE'); ?>
     </legend>
     <legend>
     <?php echo t('SEL_FILE'); ?>
     </legend>
@@ -279,15 +284,10 @@ if ($cfg['maximal_upload_size'] >= 1024) {
 
         <p id="max_file_size" class="config"></p>
     <p>
 
         <p id="max_file_size" class="config"></p>
     <p>
-    <input type="submit" id="send" value="<?php echo t('SEND'); ?>"
-    onclick="
-        document.getElementById('upload').style.display = 'none';
-        document.getElementById('uploading').style.display = '';
-        upload (<?php echo jirafeau_get_max_upload_chunk_size_bytes($cfg['max_upload_chunk_size_bytes']); ?>);
-    "/>
+    <input type="submit" id="send" value="<?php echo t('SEND'); ?>"/>
     </p>
         </table>
     </p>
         </table>
-    </div> </fieldset>
+    </div> </fieldset></form>
 
     <?php
     if (jirafeau_user_session_logged()) {
 
     <?php
     if (jirafeau_user_session_logged()) {

patrick-canterino.de