cmd/syncthing: Use random folder ID for default folder, limit random charset

This uses the same charset as the Javascript code, excluding confusing
characters like 0, O, I, 1, l etc.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3064
This commit is contained in:
Jakob Borg
2016-05-09 09:43:40 +00:00
committed by Audrius Butkevicius
parent 3ad42d9279
commit 0761d804a4
2 changed files with 4 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ import (
)
// randomCharset contains the characters that can make up a randomString().
const randomCharset = "01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-"
const randomCharset = "2345679abcdefghijkmnopqrstuvwxyzACDEFGHJKLMNPQRSTUVWXYZ"
func init() {
// The default RNG should be seeded with something good.