Re: SetEnvIf failure or success?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mysterious Mose wrote:
Hello again Lance,

PCRE version 7.8 2008-09-05
   re>  @^/(.*)/umg-(.*)(.html|/(.*)?)$@
data> /umgs/umg-up.dlt.sslcerts.mgttool/umgs.php
  0: /umgs/umg-up.dlt.sslcerts.mgttool/umgs.php
  1: umgs
  2: up.dlt.sslcerts.mgttool
  3: /umgs.php
  4: umgs.ph

    Wow, this is a very handy tool I have never heard of before! Thanks
for mentioning it, I'm sure it will be handy for me to use in the
future.

	Can't take credit for this, Eric Covener noted it in this thread
	first.   Not available on my Solaris 10 platforms, but was present on
	an RHEL6 host I'm eventually going to be migrating those Solaris 10
	-hosted sites to them.  I also found web-based cgi scripts that do
	similar analysis.

SetEnvIf REQUEST_URI "^/(.*)/umg-(.*)(.html|/(.*)?)$" UMG="arbitrary"

      And I still see the same empty results (UMG=- logged).

This suggests the SetEnvIf pattern match is failing, because otherwise I
SHOULD
be getting a value of "arbitrary" assigned, right?

    A brute force way to debug this would be to temporarily try:

SetEnvIf REQUEST_URI "^(.*)$" UMG=$1

    Or even something simpler like:

SetEnvIf REQUEST_URI "." UMG="arbitrary"

    Then see what you get. If still nothing, it's apparently not even
testing this condition. If you get what you expect, then gradually
build up to the regexp you want, and see at what point you stop
getting data.
	
	Well, that was an interesting exercise...

1)   SetEnvIf REQUEST_URI "^(.*)$" UMG=1

Logs (matching) REQUEST_URI of "/umgs/umg-up.dlt.ul.gml.managers/umgs.php" as:
 ....."GET /umgs/umg-up.dlt.ul.gml.managers/umgs.php HTTP/1.1" 401 1837 UMG=1

2)   SetEnvIf REQUEST_URI "^(.*)$" UMG=$1

Logs (non-matching) REQUEST_URI of "/liasprobe/helpalert" as:
 ....."GET /liasprobe/helpalert HTTP/1.1" 200 424 UMG=/liasprobe/helpalert

Logs (matching) REQUEST_URI of "/umgs/umg-up.dlt.ul.gml.managers/umgs.php" as:
 ....."GET /umgs/umg-up.dlt.ul.gml.managers/umgs.php HTTP/1.1" 401 1837
						 UMG=/errorpages/401.html

3)   SetEnvIf REQUEST_URI "^(.*)/umg-(.*)$" UMG=$1

Logs (non-matching) REQUEST_URI of "/server-info?config" as:
 ....."GET /server-info?config HTTP/1.1" 200 38314 UMG=-

Logs (matching) REQUEST_URI of "/umgs/umg-up.dlt.ul.gml.managers/umgs.php" as:
 ....."GET /umgs/umg-up.dlt.ul.gml.managers/umgs.php HTTP/1.1" 401 1837
						 UMG=/errorpages/401.html

I have to wonder if it's not the parsing, but the assignment that's failing, that version 2.0.15 thing -- that my Solaris 10 version of the code is old...

Aside -- shouldn't there be a way I can examine the mod_setenvif.so file to determine which version it is? mod_info's server-info handler clearly isn't giving it to me.

--
J.Lance Wilkinson ("Lance")		InterNet: Lance.Wilkinson@xxxxxxx
Systems Design Specialist - Lead	Phone: (814) 865-4870
Digital Library Technologies		FAX:   (814) 863-3560
E3 Paterno Library
Penn State University
University Park, PA 16802

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux