Difference: SourceCode (4 vs. 5)

Revision 52007-01-16 - TWikiContributor

Line: 26 to 26
 
Changed:
<
<
This package has smell factor of 2
>
>
This package has smell factor of 1
 

TWiki::Attrs

Added:
>
>
 Class of attribute sets, designed for parsing and storing attribute values from a TWiki tag e.g. %TAG{fred='bad' "sad" joe="mad"}%
Line: 55 to 56
 

TWiki::Client::ApacheLogin

Changed:
<
<
This is login manager that you can specify in the security setup section of configure. It instructs TWiki to cooperate with your web server (typically Apache) to require authentication information (username & password) from users. It requires that you configure your web server to demand authentication for scripts named "login" and anything ending in "auth". The latter should be symlinks to existing scripts; e.g., viewauth -> view, editauth -> edit, and so on.
>
>
This is login manager that you can specify in the security setup section of configure. It instructs TWiki to cooperate with your web server (typically Apache) to require authentication information (username & password) from users. It requires that you configure your web server to demand authentication for scripts named "login" and anything ending in "auth". The latter should be symlinks to existing scripts; e.g., viewauth -> view, editauth -> edit, and so on.
  See also TWikiUserAuthentication.
Line: 73 to 80
  On it's own, an object of this class is used when you specify 'none' in the security setup section of
Changed:
<
<
configure. When it is used,
>
>
configure. When it is used,
 logins are not supported. If you want to authenticate users then you should consider TemplateLogin or ApacheLogin, which are subclasses of this class.
Line: 86 to 93
 let the perl optimiser optimise out the trace function as a no-op if tracing is disabled.
Added:
>
>
Here's an overview of how it works:

Early in TWiki::new, the login manager is created. The creation of the login manager does two things:

  1. If sessions are in use, it loads CGI::Session but doesn't initialise the session yet.
  2. Creates the login manager object
Slightly later in TWiki::new, loginManager->loadSession is called.
  1. Calls loginManager->getUser to get the username before the session is created
    • TWiki::Client::ApacheLogin looks at REMOTE_USER
    • TWiki::Client::TemplateLogin just returns undef
  2. reads the TWIKISID cookie to get the SID (or the TWIKISID parameters in the CGI query if cookies aren't available, or IP2SID mapping if that's enabled).
  3. Creates the CGI::Session object, and the session is thereby read.
  4. If the username still isn't known, reads it from the cookie. Thus TWiki::Client::ApacheLogin overrides the cookie using REMOTE_USER, and TWiki::Client::TemplateLogin always uses the session.

Later again in TWiki::new, plugins are given a chance to override the username found from the loginManager.

The last step in TWiki::new is to find the user, using whatever user mapping manager is in place.

 

ObjectData twiki

Added:
>
>
 The TWiki object this login manager is attached to.
Line: 95 to 120
 

TWiki::Client::TemplateLogin

Changed:
<
<
This is a login manager that you can specify in the security setup section of configure. It provides users with a template-based form to enter usernames and passwords, and works with the PasswordManager that you specify to verify those passwords.
>
>
This is a login manager that you can specify in the security setup section of configure. It provides users with a template-based form to enter usernames and passwords, and works with the PasswordManager that you specify to verify those passwords.
  Subclass of TWiki::Client; see that class for documentation of the methods of this class.

Changed:
<
<
This package has smell factor of 2
>
>
This package has smell factor of 1
 

TWiki::Compatibility

Support for compatibility with old TWiki versions. Packaged separately because 99.999999% of the time this won't be needed.

Deleted:
<
<
=end
 
Deleted:
<
<
sub _upgradeCategoryItem { my ( $catitems, $ctext ) = @_; my $catname = ''; my $scatname = ''; my $catmodifier = ''; my $catvalue = ''; my @cmd = split( /\|/, $catitems ); my $src = ''; my $len = @cmd; if( $len < '2' ) { # FIXME return ( $catname, $catmodifier, $catvalue ) } my $svalue = '';

my $i; my $itemsPerLine;

# check for CategoryName=CategoryValue parameter my $paramCmd = ''; my $cvalue = ''; # was$query->param( $cmd[1] ); if( $cvalue ) { $src = "

<---->
$cvalue
<---->
"; } elsif( $ctext ) { foreach( split( /\r?\n/, $ctext ) ) { if( /$cmd[1]/ ) { $src = $_; last; } } }

if( $cmd[0] eq 'select' || $cmd[0] eq 'radio') { $catname = $cmd[1]; $scatname = $catname; #$scatname =~ s/[^a-zA-Z0-9]//g; my $size = $cmd[2]; for( $i = 3; $i < $len; $i++ ) { my $value = $cmd[$i]; $svalue = $value; if( $src =~ /$value/ ) { $catvalue = $svalue; } }

} elsif( $cmd[0] eq 'checkbox' ) { $catname = $cmd[1]; $scatname = $catname; #$scatname =~ s/[^a-zA-Z0-9]//g; if( $cmd[2] eq 'true' || $cmd[2] eq '1' ) { $i = $len - 4; $catmodifier = 1; } $itemsPerLine = $cmd[3]; for( $i = 4; $i < $len; $i++ ) { my $value = $cmd[$i]; $svalue = $value; # I18N: FIXME - need to look at this, but since it's upgrading # old forms that probably didn't use I18N, it's not a high # priority. if( $src =~ /$value[^a-zA-Z0-9\.]/ ) { $catvalue .= ", " if( $catvalue ); $catvalue .= $svalue; } }

} elsif( $cmd[0] eq 'text' ) { $catname = $cmd[1]; $scatname = $catname; #$scatname =~ s/[^a-zA-Z0-9]//g; $src =~ /

<---->
(.*)
<---->
/; if( $1 ) { $src = $1; } else { $src = ''; } $catvalue = $src; }
 
Changed:
<
<
return ( $catname, $catmodifier, $catvalue ) }
>
>
This package has smell factor of 2
 
Added:
>
>

TWiki::Configure::Load

 
Added:
>
>

Purpose

 
Added:
>
>
This module consists of just a single subroutine readConfig. It allows to safely modify configuration variables for one single run without affecting normal TWiki operation.
 
Changed:
<
<
This package has smell factor of 2
>
>

This package doesn't smell

[[TWikiConfigureUIsEXTENDDotPm][]]

This package has smell factor of 1

 

TWiki

Line: 211 to 171
 
Changed:
<
<
This package has smell factor of 29
>
>
This package has smell factor of 25
 

TWiki::Form

Line: 219 to 179
 
Changed:
<
<
This package has smell factor of 10
>
>
This package has smell factor of 9
 

TWiki::Func

Line: 331 to 291
 
Changed:
<
<
This package has smell factor of 6
>
>
This package has smell factor of 3
 

TWiki::Net

Line: 412 to 372
 
Changed:
<
<
This package has smell factor of 2
>
>
This package has smell factor of 1
 

TWiki::Prefs::PrefsCache

Line: 435 to 395
 
Changed:
<
<
This package has smell factor of 1
>
>
This package doesn't smell
 

TWiki::Render

Line: 443 to 403
 
Changed:
<
<
This package has smell factor of 22
>
>
This package has smell factor of 19
 

TWiki::Sandbox

Added:
>
>
 This object provides an interface to the outside world. All calls to system functions, or handling of file names, should be brokered by this object.
Line: 460 to 421
 
Changed:
<
<
This package has smell factor of 22
>
>
This package has smell factor of 20
 

TWiki::Store

Line: 607 to 569
 
Changed:
<
<
This package has smell factor of 10
>
>
This package has smell factor of 7
 

TWiki::UI::ChangeForm

Line: 646 to 609
 
Changed:
<
<
This package has smell factor of 1
>
>
This package doesn't smell
 

TWiki::UI::RDiff

Line: 662 to 625
 
Changed:
<
<
This package has smell factor of 20

TWiki::UI::Rest

Rest delegate for view function

This package doesn't smell

>
>
This package has smell factor of 19
 

TWiki::UI::Save

Line: 678 to 633
 
Changed:
<
<
This package doesn't smell
>
>
This package has smell factor of 1
 

TWiki::UI::Search

Line: 709 to 665
 
Changed:
<
<
This package has smell factor of 1
>
>
This package has smell factor of 2
 

TWiki::User

Line: 781 to 738
 This package has smell factor of 3
Changed:
<
<
There were a total of 220 smells
>
>
There were a total of 201 smells
 
This site is powered by the TWiki collaboration platformCopyright © 1999-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.SourceCode.