Item10803: CompareRevisionsAddOn causes illegal {SwitchBoard}
value in Foswiki configuration (affects ApacheLogin users)
Priority: Urgent
Current State: Closed
Released In: 1.1.4
Target Release: patch
On a fresh checkout, a full run through configure will eventually produce an illegal value for
{SwitchBoard}{compareauth}
(this script is used in ApacheLogin configurations to authenticate access to the
compare
script):
You are about to update 1 setting
{SwitchBoard}{compareauth} HASH(0x163e2f8)
The
lib/Foswiki/Contrib/CompareRevisionsAddOn/Config.spec
file is wrong; the
{SwitchBoard}{compareauth}
entry is missing its type information, so Foswiki's configure UI treats the value is a string (instead of a hash).
So the
Config.spec
should look like this:
# ---+ Extensions
# ---++ CompareRevisionsAddOn
# **PERL**
# This setting is required to enable executing the compare script from the bin directory
$Foswiki::cfg{SwitchBoard}{compare} = {
package => 'Foswiki::Contrib::CompareRevisionsAddOn::Compare',
function => 'compare',
context => {
diff => 1,
comparing => 1
}
};
# **PERL**
# This setting is required when using ApacheLogin and the user needs to be authenticated when executing the compare script
$Foswiki::cfg{SwitchBoard}{compareauth} = {
package => 'Foswiki::Contrib::CompareRevisionsAddOn::Compare',
function => 'compare',
context => {
diff => 1,
comparing => 1
}
};
1;
The problem now, is that we have shipped a broken
Config.spec
in the last couple of releases of
CompareRevisionsAddOn (incl. the version shipped in Foswiki 1.1.3), and simply fixing the
Config.spec
isn't enough.
So I've add a Configure checker that will flag an error in the configure UI if the switchboard entry is invalid, with instructions to copy-paste the value from
{SwitchBoard}{compare}
above.
--
PaulHarvey - 28 May 2011
Although this is a terrible mistake on my part, this switchboard entry is only used when:
- You are using ApacheLogin
- You are not authenticated
- The topic denies access to WikiGuest
- You directly access an
/bin/compare
or /bin/compareauth
URL
--
PaulHarvey - 28 May 2011