1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-22 07:42:37 +00:00

fix: base62 conversion in peer-id generation (#6486)

This commit is contained in:
Cœur 2024-01-06 21:14:20 +01:00 committed by GitHub
parent ae96a2d4b1
commit f6f3ff6e29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,7 +47,7 @@ fi
# '-TR400B-' (4.0.0 Beta)
# '-TR400Z-' (4.0.0 Dev)
# '-TR4000-' (4.0.0)
BASE62=($(echo {0..9} {A..A} {a..z}))
BASE62=($(echo {0..9} {A..Z} {a..z}))
peer_id_prefix="-TR${BASE62[$(( 10#$major_version ))]}${BASE62[$(( 10#$minor_version ))]}${BASE62[$(( 10#$patch_version ))]}"
if [ "$is_dev" = true ]; then
peer_id_prefix="${peer_id_prefix}Z"