Просмотр исходного кода

* Don't generate SALTS if missing during initialization

This feature was causing too much confusion. People would end up
generating different salts on all binaries/shells. Only to realize
it too late and have to redo it all over again. Use the site's generate
button or type in random characters yourself to the proper lengths.
Bryan Drewery 17 лет назад
Родитель
Сommit
42f7563f80
2 измененных файлов с 2 добавлено и 19 удалено
  1. 2 0
      doc/UPDATES
  2. 0 19
      src/binary.c

+ 2 - 0
doc/UPDATES

@@ -1,3 +1,5 @@
+* Binary will no longer generate SALTS if missing from the PackConfig. This was causing too much confusion.
+
 1.2.16 - http://wraith.botpack.net/milestone/1.2.16
 * Add 'set altchars' so that alternative characters used for nicks can be changed. (fixes #418)
 * Fix channels added by cmd_slowjoin not having the user who added them associated with the channel.

+ 0 - 19
src/binary.c

@@ -350,25 +350,6 @@ readcfg(const char *cfgfile)
   }
   if (f)
     fclose(f);
-  if (!settings.salt1[0] || !settings.salt2[0]) {
-    /* Write salts back to the cfgfile */
-    char salt1[SALT1LEN + 1] = "", salt2[SALT2LEN + 1] = "";
-
-    printf(STR("Creating Salts"));
-    if ((f = fopen(cfgfile, "a")) == NULL) {
-      printf(STR("Cannot open cfgfile for appending.. aborting\n"));
-      exit(1);
-    }
-    make_rand_str(salt1, SALT1LEN);
-    make_rand_str(salt2, SALT2LEN);
-    salt1[sizeof salt1 - 1] = salt2[sizeof salt2 - 1] = 0;
-    strlcpy(settings.salt1, salt1, sizeof(settings.salt1));
-    strlcpy(settings.salt2, salt2, sizeof(settings.salt2));
-    fprintf(f, STR("SALT1 %s\n"), salt1);
-    fprintf(f, STR("SALT2 %s\n"), salt2);
-    fflush(f);
-    fclose(f);
-  }
   printf(STR(" Success\n"));
   return 1;
 }