소스 검색

Add files via upload

Daniele Bonini (皮夕): WebDev and DevOps by lots of Sim.pli.city bits 3 년 전
부모
커밋
2eb292b56d
2개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  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()) {
       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.");  
         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.
 Copyrights licensed under the New BSD License.
 See the accompanying LICENSE file for terms.
-ver. 6.0.0
+ver. 6.0.0c
 */
 
 'use strict';
@@ -39,7 +39,7 @@ function escapeUnsafeChars(unsafeChar) {
 }
 
 // upd - 5 Mode
-function rnd(min, max) {
+function sjrnd(min, max) {
   var ress = "";
   var resa = [];
   min = Math.ceil(min);
@@ -56,7 +56,7 @@ function rnd(min, max) {
 function generateUID() {
     // upd - 5 Mode
     //var bytes = randomBytes(UID_LENGTH);
-    var bytes = rnd(1000000000000000, 9999999999999999);
+    var bytes = sjrnd(1000000000000000, 9999999999999999);
     // ---
     var result = '';
     for(var i=0; i<UID_LENGTH; ++i) {