Browse Source

Add files via upload

Daniele Bonini (皮夕): WebDev and DevOps by lots of Sim.pli.city bits 3 years ago
parent
commit
2eb292b56d
2 changed files with 5 additions and 4 deletions
  1. 2 1
      Public/js/dragndrop-code.js
  2. 3 3
      Public/js/serialize-javascript.js

+ 2 - 1
Public/js/dragndrop-code.js

@@ -81,7 +81,8 @@ function onDrop(e) {
 
 
     if (cubes[i].getpassword() === newcube.getpassword()) {
     if (cubes[i].getpassword() === newcube.getpassword()) {
       pwd2 = prompt("password confirmation:");
       pwd2 = prompt("password confirmation:");
-      if (cubes[i].getpassword() != pwd2) {
+      pwd2en = encryptSha2(pwd2);
+      if (cubes[i].getpassword() != pwd2en) {
         $("#cubeList").html("<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Permission denied.");  
         $("#cubeList").html("<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Permission denied.");  
         return;
         return;
       }  
       }  

+ 3 - 3
Public/js/serialize-javascript.js

@@ -3,7 +3,7 @@ Copyright (c) 2014, Yahoo! Inc. All rights reserved.
 Copyright (c) 2021, 5 Mode, requirements, installation and code changes.
 Copyright (c) 2021, 5 Mode, requirements, installation and code changes.
 Copyrights licensed under the New BSD License.
 Copyrights licensed under the New BSD License.
 See the accompanying LICENSE file for terms.
 See the accompanying LICENSE file for terms.
-ver. 6.0.0
+ver. 6.0.0c
 */
 */
 
 
 'use strict';
 'use strict';
@@ -39,7 +39,7 @@ function escapeUnsafeChars(unsafeChar) {
 }
 }
 
 
 // upd - 5 Mode
 // upd - 5 Mode
-function rnd(min, max) {
+function sjrnd(min, max) {
   var ress = "";
   var ress = "";
   var resa = [];
   var resa = [];
   min = Math.ceil(min);
   min = Math.ceil(min);
@@ -56,7 +56,7 @@ function rnd(min, max) {
 function generateUID() {
 function generateUID() {
     // upd - 5 Mode
     // upd - 5 Mode
     //var bytes = randomBytes(UID_LENGTH);
     //var bytes = randomBytes(UID_LENGTH);
-    var bytes = rnd(1000000000000000, 9999999999999999);
+    var bytes = sjrnd(1000000000000000, 9999999999999999);
     // ---
     // ---
     var result = '';
     var result = '';
     for(var i=0; i<UID_LENGTH; ++i) {
     for(var i=0; i<UID_LENGTH; ++i) {