mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-23 14:46:24 +00:00
01_FHEMWEB.pm: logFormat fix, allowed.pm: change basicAuthMsg (Forum #113192)
git-svn-id: https://svn.fhem.de/fhem/trunk@22541 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
127b8462b6
commit
b78dd3bc02
@ -3520,9 +3520,9 @@ FW_log($$)
|
|||||||
b=>$length
|
b=>$length
|
||||||
);
|
);
|
||||||
|
|
||||||
$fmt =~ s/%([^" ]*)/defined($cp{$1}) ? $cp{$1} : "%$1"/ge;
|
|
||||||
$fmt =~ s/%\{([^" ]*)\}/
|
$fmt =~ s/%\{([^" ]*)\}/
|
||||||
defined($FW_httpheader{$1}) ? $FW_httpheader{$1} : "%{$1}" /gex;
|
defined($FW_httpheader{$1}) ? $FW_httpheader{$1} : "-" /gex;
|
||||||
|
$fmt =~ s/%([^" ]*)/defined($cp{$1}) ? $cp{$1} : "-"/ge;
|
||||||
|
|
||||||
my $ld = AttrVal($FW_wname, "logDevice", undef);
|
my $ld = AttrVal($FW_wname, "logDevice", undef);
|
||||||
CallFn($ld, "LogFn", $defs{$ld}, $fmt) if($defs{$ld});
|
CallFn($ld, "LogFn", $defs{$ld}, $fmt) if($defs{$ld});
|
||||||
|
@ -191,7 +191,7 @@ allowed_Authenticate($$$$)
|
|||||||
|
|
||||||
return &$doReturn(1, 1) if($pwok);
|
return &$doReturn(1, 1) if($pwok);
|
||||||
|
|
||||||
my $msg = AttrVal($aName, "basicAuthMsg", "FHEM: login required");
|
my $msg = AttrVal($aName, "basicAuthMsg", "Login required");
|
||||||
$cl->{".httpAuthHeader"} = "HTTP/1.1 401 Authorization Required\r\n".
|
$cl->{".httpAuthHeader"} = "HTTP/1.1 401 Authorization Required\r\n".
|
||||||
"WWW-Authenticate: Basic realm=\"$msg\"\r\n";
|
"WWW-Authenticate: Basic realm=\"$msg\"\r\n";
|
||||||
return &$doReturn(2, $secret);
|
return &$doReturn(2, $secret);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user