Skip to content

Commit

Permalink
Timeformat fix
Browse files Browse the repository at this point in the history
date -Iseconds
2018-12-16T08:52:15+01:00

date +%Y-%m-%dT%H:%M:%S%z
2018-12-16T08:52:36+0100
  • Loading branch information
quickmic committed Dec 16, 2018
1 parent 6eb7f1a commit d7aa308
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions WebUI/www/config/cp_security.cgi
Expand Up @@ -29,7 +29,7 @@ proc get_current_key_index {} {
set CURRENT_INDEX "Current user key"
set PREVIOUS_INDEX "Previous user key"

# Schlüssel-Index ermitteln
# Schlüssel-Index ermitteln
set fd [open "|crypttool -g" r]
set content [read $fd]
close $fd
Expand Down Expand Up @@ -93,14 +93,14 @@ proc getBackupErrorMessage {errorCode migration_mode} {
# ERROR CODES:
# 9 = Check the script /bin/checkUsrBackup.sh - the java call is wrong
# 10 = OK
# 11 = Backup fehlerhaft / unvollständig (z.B. *.apkx Datei fehlt)
# 11 = Backup fehlerhaft / unvollständig (z.B. *.apkx Datei fehlt)
# 12 = Internet fehlt / KeyServer Timeout
# 13 = KeyServer NAK (eine oder beide sind nicht im KeyServer)
# 14 = Fehler bei Gerätepersistenz (einlesen fehlgeschlagen oder Versionen / Typen nicht kompatibel)
# 15 = Migration Fehlgeschlagen (nicht für die Backup Validierungs Main)
# 16 = Adapter (Coprozessor) nicht verfügbar (basierend auf den Konfigurationen aus dem Backup + Default aus /etc)
# 17 = Adapter konnte nicht initialisiert werden (beschädigte Application / Fehlerrückmeldungen)
# 18 = Adapter Version nicht unterstützt
# 14 = Fehler bei Gerätepersistenz (einlesen fehlgeschlagen oder Versionen / Typen nicht kompatibel)
# 15 = Migration Fehlgeschlagen (nicht für die Backup Validierungs Main)
# 16 = Adapter (Coprozessor) nicht verfügbar (basierend auf den Konfigurationen aus dem Backup + Default aus /etc)
# 17 = Adapter konnte nicht initialisiert werden (beschädigte Application / Fehlerrückmeldungen)
# 18 = Adapter Version nicht unterstützt
# 99 = Unknown error

if {$errorCode == 13} {
Expand Down Expand Up @@ -172,15 +172,15 @@ proc action_change_key {} {
# check the entered key against our current system key
if { ![catch {exec crypttool -v -t 3 -k "$key1"}]} {

# "Der eingegebene Schlüssel entspricht dem aktuellen Schlüssel der Zentrale. "
# "Der Schlüssel wird nicht geändert."
# "Der eingegebene Schlüssel entspricht dem aktuellen Schlüssel der Zentrale. "
# "Der Schlüssel wird nicht geändert."
put_message "\${dialogSettingsSecurityMessageHintSecKeyTitle}" \${dialogSettingsSecurityMessageErrorSecKeyContentKeysIsIdentical} {\${dialogBack} "showSecurityCP();"}
return
}

if { [catch {set_key $key1}] } {
# "Der Schlüssel konnte nicht gesetzt werden. Das liegt vermutlich daran, daß "
# "der aktuelle Schlü;ssel noch nicht an alle Komponenten übertragen wurde. "
# "Der Schlüssel konnte nicht gesetzt werden. Das liegt vermutlich daran, daß "
# "der aktuelle Schlü;ssel noch nicht an alle Komponenten übertragen wurde. "
# "Hinweise darauf finden Sie in den Servicemeldungen."
put_message "\${dialogSettingsSecurityMessageErrorSecKeyTitle}" \${dialogSettingsSecurityMessageErrorSecKeyContentKeyNotAllDevices} {\${dialogBack} "showSecurityCP();"}
return
Expand Down Expand Up @@ -324,7 +324,7 @@ proc action_factory_reset_go {} {
${dialogPerformRebootContent}
} {"\${btnNewLogin}" "window.location.href='/';"}

# Nicht mehr nötig, siehe TWIST-22
# Nicht mehr nötig, siehe TWIST-22
set comment {
else {
division {class="popupTitle"} {
Expand Down Expand Up @@ -391,12 +391,12 @@ proc action_backup_restore_check {} {

if { "false" == $ccu1_backup } {
set config_has_user_key [expr {"$stored_signature" != "$calculated_signature"} ]
} else { #CCU1 used an other default key. So we can´t check with crypttool.
} else { #CCU1 used an other default key. So we can´t check with crypttool.
set config_has_user_key [exec cat key_index]
}
} errorMessage] } {
# "Die ausgewählte Datei enthält kein HomeMatic Systembackup. "
# "Bitte wählen Sie eine gültige Backup-Datei aus."
# "Die ausgewählte Datei enthält kein HomeMatic Systembackup. "
# "Bitte wählen Sie eine gültige Backup-Datei aus."
put_message "\${dialogSettingsSecurityMessageSysBackupInvalidFileTitle}" \${dialogSettingsSecurityMessageSysBackupInvalidFileContent} {\${dialogBack} "showSecurityCP();"}
return
}
Expand Down Expand Up @@ -529,7 +529,7 @@ proc action_backup_restore_go {} {

if { "false" == $ccu1_backup } {
set config_has_user_key [expr {"$stored_signature" != "[exec crypttool -s -t 0 <usr_local.tar.gz]"} ]
} else { #CCU1 used an other default key. So we can´t check with crypttool.
} else { #CCU1 used an other default key. So we can´t check with crypttool.
set config_has_user_key [exec cat key_index]
}
catch { import key }
Expand Down Expand Up @@ -1304,7 +1304,7 @@ proc action_put_page {} {
dlgPopup.LoadFromFile(url, "action=change_key&key1="+document.getElementById("text_key1").value+"&key2="+document.getElementById("text_key2").value);
}
OnBackupSubmit = function() {
//ProgressBar = new ProgressBarMsgBox("Systembackup wird übertragen...", 1);
//ProgressBar = new ProgressBarMsgBox("Systembackup wird übertragen...", 1);
//ProgressBar.show();
//ProgressBar.StartKnightRiderLight();

Expand Down Expand Up @@ -1465,7 +1465,7 @@ proc action_put_page {} {

proc action_create_backup {} {
set HOSTNAME [exec hostname]
set iso8601_date [exec date -Iseconds]
set iso8601_date [exec date +%Y-%m-%dT%H:%M:%S%z]
regexp {^(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)([+-]\d+)$} $iso8601_date dummy year month day hour minute second zone
#save DOM
rega system.Save()
Expand Down Expand Up @@ -1501,7 +1501,7 @@ proc action_backup_upload {} {
cgi_javascript {
puts "var url = \"$env(SCRIPT_NAME)?sid=$sid\";"
puts {
//parent.top.ProgressBar.IncCounter("Backup wurde übertragen.");
//parent.top.ProgressBar.IncCounter("Backup wurde übertragen.");
parent.top.dlgPopup.hide();
parent.top.dlgPopup.setWidth(400);
parent.top.dlgPopup.LoadFromFile(url, "action=backup_restore_check");
Expand Down

0 comments on commit d7aa308

Please sign in to comment.