diff --git a/data.RES b/data.RES
deleted file mode 100644
index f882cec..0000000
Binary files a/data.RES and /dev/null differ
diff --git a/default.tpl b/default.tpl
index d6faae9..0cc0ebb 100644
--- a/default.tpl
+++ b/default.tpl
@@ -5,9 +5,10 @@ Here below you'll find some options affecting the template.
Consider 1 is used for "yes", and 0 is used for "no".
DO NOT EDIT this template just to change options. It's a very bad way to do it, and you'll pay for it!
-Correct way: in Virtual file system, right click on home/root, properties, diff template,
-put this text [+special:strings]
+Correct way: create a new text file 'hfs.diff.tpl' in the same folder of the program.
+Add this as first line [+special:strings]
and following all the options you want to change, using the same syntax you see here.
+That's all. To know more about diff templates read the documentation.
[+special:strings]
@@ -15,7 +16,7 @@ option.newfolder=1
option.move=1
option.comment=1
option.rename=1
-COMMENT with these you can disable some features of the template. Please note this is not about user permissions, this is global!
+COMMENT with the ones above you can disable some features of the template. They apply to all users.
[common-head]
@@ -26,7 +27,7 @@ COMMENT with these you can disable some features of the template. Please note th
-
+
[]
@@ -69,10 +70,10 @@ COMMENT with these you can disable some features of the template. Please note th
function changePwd() {
{.if|{.can change pwd.}
- | ask(this.innerHTML, 'password', function(s){
+ | ask(' {.!Change password.}', 'password', function(s){
s && ajax('changepwd', {'new':s}, getStdAjaxCB(function(){
- showMsg("{.!Password changed, you'll have to login again..}")
- location = '~login'
+ showLoading(false)
+ showMsg("{.!Password changed.}")
}))
})
| showError("{.!Sorry, you lack permissions for this action.}")
@@ -869,19 +870,12 @@ function showLogin(options) {
\
', options)
- var data
d.find('form').submit(function(){
var vals = d.find('[name]').get().map(x=> x.value.trim())
- var sid = "{.cookie|HFS_SID_.}"
- var p = vals[1]
- data = { user:vals[0] }
- try { eval("(async ()=> send('passwordSHA256', await digest(await digest(p)+sid) ) )()") }
- catch(e) { send('password', p) }
- return false
- })
-
- function send(k,v){
- data[k] = v
+ var data = {
+ user: vals[0],
+ passwordSHA256: sha256(sha256(vals[1])+HFS.sid) // hash must be lowercase. Double-hashing is causing case sensitiv
+ }
$.post("?mode=login", data, function(res){
if (res !== 'ok')
return showError(res)
@@ -889,7 +883,8 @@ function showLogin(options) {
showLoading()
location.reload()
});
- }
+ return false
+ })
} // showLogin
function showLoading(show){
@@ -905,22 +900,18 @@ function showAccount() {
dialog('