1
0
mirror of https://github.com/j-a-n/raspberrymatic-addon-rmupdate.git synced 2023-10-10 11:37:40 +00:00

Implement session and login handling

This commit is contained in:
Jan Schneider
2018-07-28 02:04:49 +02:00
parent ad09a64d76
commit 34d35761ca
4 changed files with 132 additions and 75 deletions

View File

@@ -1,9 +0,0 @@
catch {
set input $env(QUERY_STRING)
set pairs [split $input &]
foreach pair $pairs {
if {0 != [regexp "^(\[^=]*)=(.*)$" $pair dummy varname val]} {
set $varname $val
}
}
}

View File

@@ -1,13 +0,0 @@
#!/bin/tclsh
load tclrega.so
proc check_session sid {
if {[regexp {@([0-9a-zA-Z]{10})@} $sid all sidnr]} {
set res [lindex [rega_script "Write(system.GetSessionVarStr('$sidnr'));"] 1]
if {$res != ""} {
return 1
}
}
return 0
}