Unpriv users... SelfService problems

Hi,

I was experiencing the following problem:

  • a unprivileged user was able to login into the
    system, but all the links at SelfService page seems
    not working, reopening the same page, even
    the Logout link…

I was able to find similar problems in the list
but not a clue for a solution… Well, I think
that now I’m able to share with the list at least
a clue and a work around:

I found that in the problematic system, the variable:

$m->base_comp->path

have one extra slash (/) in the begining of the
string… I don’t know why…

I first thought that was a bug in the version of the
Mason library, but that wasn’t the case… I have
two instalations of RT 2.0.11 with the same version
of the Mason library and one operates
correctly and the other with the error…

Well, to test if it is the case, one can add the
following lines to the begining of the <%INIT> section
of the autohandler:

print STDERR “teste de base_comp “;
print STDERR $m->base_comp->path,”\n”;

then view the result at apache error log:
(tail -f /var/log/httpd/error_log)

My workaround was to modify two regular expressions
in the autohandler:

(…)

#if it’s a noauth file, don’t ask for auth.
if ($m->base_comp->path =~ ‘^//NoAuth/’) {
$m->call_next();
$m->abort();
}
(…)

If the user isn’t privileged, they can only see SelfService

   if ((! $session{'CurrentUser'}->Privileged) and
           ($m->base_comp->path !~ '^//SelfService/') ) {
               $m->comp('/SelfService/index.html');
	               $m->abort();

(…)

[]'s

Moreiras.
Laborat�rio - Ag�ncia Estado

  • a unprivileged user was able to login into the
    system, but all the links at SelfService page seems
    not working, reopening the same page, even
    the Logout link…

    I found that in the problematic system, the variable:

    $m->base_comp->path

have one extra slash (/) in the begining of the
string… I don’t know why…

Note that none of the path variables (web or absolute) in config.pm should
have a trailing ‘/’ character. The only exception to this appears to be
generated $WebURL. Please check your config.pm as this appears to be
where a problem may lie.

A ‘diff’ between the config.pms of the working and non-working
installations should also assist you.

Regards,

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B                      Operations

I tried Antonio’s fix on my server and it did work. I also took Bruce
Campbell’s advice and checked config.pm for a trailing ‘/’ in any of the
URLs. None found except for a couple that are already there in the
original source. I saved a copy of the html source of a working
SelfService page, took out Antonio’s changes, and saved the source of the
non-working page. Ran diff on the source. No difference at all.

Took a look at the example apache config for an aliased directory. Almost
the same as in the docs, but with one difference. The docs show this as
the Alias directive:

Alias /rt2/ /usr/local/rt2/WebRT/html/

I had read the FAQ and had changed it to:

Alias /rt2 /usr/local/rt2/WebRT/html/

as per the entry here: http://fsck.com/rtfm/article.html?id=5#64

I put the trailing slash back in the Alias directive and it worked. An
added bonus was that the stylesheet started working as well (it also worked
with Antonio’s changes to autohandler.)

So, which part is acting incorrectly? For now, I’m making the change to RT
rather than to apache.

David Miller
Systems Administrator
Department of Design
Department of Art
The Ohio State University

Hooray! This works!! Thanks man, now I can finally show the SelfService
thing to my users!

(and yes, I did verify that RT still works for privileged users. :slight_smile: )