mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 01:08:41 +00:00
revert: fix the wrong generation of our-root password and length
Due to last those commits, the password generation was modified incorrectly. It gens the $_svn_ourroot_password_ to $_svn_certroot_password_. Must revert it. According to the version from @vfleaking, the judger_socket password and the our-root password is 32 chars long.
This commit is contained in:
parent
410fe66e46
commit
64b7f9296e
@ -5,8 +5,9 @@ genRandStr(){
|
||||
#Set some vars
|
||||
_database_password_=root
|
||||
_judger_socket_port_=2333
|
||||
_judger_socket_password_=$(genRandStr 10)
|
||||
_judger_socket_password_=$(genRandStr 32)
|
||||
_main_judger_password_=$(genRandStr 32)
|
||||
_svn_ourroot_password_=$(genRandStr 32)
|
||||
_svn_certroot_password_=$(genRandStr 32)
|
||||
|
||||
getAptPackage(){
|
||||
@ -111,7 +112,7 @@ password-db = passwd
|
||||
EOD
|
||||
|
||||
svnusr="our-root"
|
||||
svnpwd="$_svn_certroot_password_"
|
||||
svnpwd="$_svn_ourroot_password_"
|
||||
|
||||
cat >\$path/conf/passwd <<EOD
|
||||
[users]
|
||||
@ -132,7 +133,7 @@ UOJEOF
|
||||
cat >/var/svn/problem/post-commit.sh <<UOJEOF
|
||||
#!/bin/sh
|
||||
svnusr="our-root"
|
||||
svnpwd="$_svn_certroot_password_"
|
||||
svnpwd="$_svn_ourroot_password_"
|
||||
cd /var/svn/problem/\$1/cur/\$1
|
||||
svn update --username \$svnusr --password \$svnpwd
|
||||
chown www-data /var/svn/problem/\$1 -R
|
||||
@ -163,7 +164,7 @@ setWebConf(){
|
||||
\$config['security']['cookie']['checksum_salt']=['$(genRandStr 16)','$(genRandStr 16)','$(genRandStr 16)'];
|
||||
\$config['judger']['socket']['port']='$_judger_socket_port_';
|
||||
\$config['judger']['socket']['password']='$_judger_socket_password_';
|
||||
\$config['svn']['our-root']['password']='$_svn_certroot_password_';
|
||||
\$config['svn']['our-root']['password']='$_svn_ourroot_password_';
|
||||
file_put_contents('/var/www/uoj/app/.config.php', "<?php\nreturn ".str_replace('\'_httpHost_\'','UOJContext::httpHost()',var_export(\$config, true)).";\n");
|
||||
UOJEOF
|
||||
#Import MySQL database
|
||||
|
Loading…
Reference in New Issue
Block a user