Name

CookiePattern — specify regular expression to extract session ID out of a client cookie

SYNOPSIS

regex_pattern

DESCRIPTION

The directive sets the regular expression that Interchange will use to extract the session ID out of the client browser's cookie.

This is useful in extracting session IDs out of cookies generated by programs other than Interchange.

DIRECTIVE TYPE AND DEFAULT VALUE

Catalog directive

EXAMPLES

Example: Setting CookiePattern

The default regular expression pattern used for CookiePattern might work sometimes, but I find it unsuitable if you just want to change the CookieName, because it then breaks the usual behavior. Here's a better value for common setups:

CookiePattern \w{8,32}

In general, however, you should only modify CookiePattern default value if you somehow change the content that Interchange stores in browser cookies (by say, letting other program create the cookie).

For a complete discussion on cookies, see cookie glossary entry.


NOTES

By default, Interchange cookie planted in user's browser consists of a session ID followed by a colon followed by an IP address, username or domain name.

AVAILABILITY

CookiePattern is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: lib/Vend/Config.pm
Line 660

['CookiePattern',   'regex',            '[-\w:.]+'],

Source: lib/Vend/Config.pm
Line 3891 (context shows lines 3891-3903)

sub parse_regex {
my($var, $value) = @_;

eval {  
  my $never = 'NeVAirBE';
  $never =~ m{$value};
};

if($@) {
  config_error("Bad regular expression in $var.");
}
return $value;
}

AUTHORS

Interchange Development Group

SEE ALSO

Cookies(7ic), CookieName(7ic), Limit(7ic)

DocBook! Interchange!