Oded Arbel | 1 Nov 2004 01:06

Re: Login problems

On Monday 01 November 2004 00:13, Matthew Good wrote:
> On Sun, 2004-10-31 at 22:47 +0200, Oded Arbel wrote:
> > Oh. I didn't put it there at all. I assumed that Trac will do its
> > own HTTP-Basic AUTH -  its not hard, I've done it countless times
> > in PHP and many many times in basically any widely used language
> > other then Python (and BASIC, but I think you'll forgive me this
> > transgression ;-) )
> >
> > Lets say I want to hack it in - where do you suppose I should put
> > it ? I'm assuming in core.py in dispatch_reqeust ? or maybe in
> > Authenticator ?
>
> Well, the tracd standalone server has authentication built-in, but
> for the CGI and ModPython setups the authentication was intentionally
> left out.  By using Apache to do the authentication we can configure
> Apache to use the same authentication for both Trac and SVN giving us
> a simple way to do single sign on, and we can make use of the variety
> of modules available for supporting different authentication methods
> (basic, digest, ldap, ...).  The sample Apache configurations on the
> Trac site include the configuration for authentication which is much
> simpler than hacking authentication into Trac itself.

The problem is that I don't have access to the apache configuration: I'm 
running on a vhost and only have .htaccess premissions. with .htaccess 
you can't (ot at least I don't know how) to setup auth for 
non-directories.

--

-- 
Oded Arbel
m-Wise mobile solutions
(Continue reading)

Joby Walker | 1 Nov 2004 01:21

Re: Login problems

Oded Arbel wrote:
> The problem is that I don't have access to the apache configuration: I'm 
> running on a vhost and only have .htaccess premissions. with .htaccess 
> you can't (ot at least I don't know how) to setup auth for 
> non-directories.

Sure you can.

Just use:

<Files filename>
....
</Files>

jbw
Oded Arbel | 1 Nov 2004 12:29

Re: Login problems

On Monday 01 November 2004 02:21, Joby Walker wrote:
> Oded Arbel wrote:
> > The problem is that I don't have access to the apache
> > configuration: I'm running on a vhost and only have .htaccess
> > premissions. with .htaccess you can't (ot at least I don't know
> > how) to setup auth for non-directories.
>
> Sure you can.
>
> Just use:
>
> <Files filename>
> ....
> </Files>

tried that. on my .htaccess, it says:
Options +ExecCGI
<Files "trac.cgi/login">
    AuthType Basic
    AuthName "m-Wise"
    AuthUserFile .htpasswd
    Require valid-user
</Files>

This is in the directory mwise where the data directory is installed (I 
can find a db directory, conf, etc') and there is a link trac.cgi which 
points to ~/local/trac/share/trac/cgi-bin/trac.cgi. when I click 
http://www.geek.co.il/mwise/trac.cgi/login nothing happens and there is 
nothing in the logs.

(Continue reading)

Russ Brown | 1 Nov 2004 14:33
Picon

Syntax hilighting

Hello,

We're new to trac and are about to roll it out to our department.

I have everything pretty much set up nicely. However, the only problem
I we have is that certain files aren't being hilighted correctly (or
rather, as we want them to be).

In particular, our codebase makes heavy use for '.inc' for PHP files.
>From what I can tell clearsilver isn't picking this up as a PHP file
when hilighting it.

There are some other exceptions in our source 

I've found one link that mentioned editing MIME_MAP in Mimeview.py.
However this seems like an extremely inelegant solution, especially
considering that this file will be overwritten whenever a newer
version of trac is installed.

Is there a way to define additional filename extensions for syntax
highlighting? I'd have thought a config file somewhere would have been
idea...

Thanks.

--

-- 

Russ
Matthew Good | 1 Nov 2004 15:07

Re: Login problems

On Mon, 2004-11-01 at 13:29 +0200, Oded Arbel wrote:
> On Monday 01 November 2004 02:21, Joby Walker wrote:
> > Sure you can.
> >
> > Just use:
> >
> > <Files filename>
> > ....
> > </Files>
> 
> tried that. on my .htaccess, it says:
> Options +ExecCGI
> <Files "trac.cgi/login">
>     AuthType Basic
>     AuthName "m-Wise"
>     AuthUserFile .htpasswd
>     Require valid-user
> </Files>

Typically for the configuration, a Location block is used instead of
Files.  I tried out something similar using Location on my server which
didn't seem to work.  It seems that it should be possible to set this up
in a .htaccess file, but I'm not quite sure how to do it.  Perhaps if
you post something the Apache mailing list someone there would know what
the configuration should be.

--

-- 
Matthew Good <trac@...>
Martin Bialasinski | 1 Nov 2004 22:13
X-Face
Picon
Favicon

[ticket 199] Diffs between any revisions of a file

Hello!

I need to see the diff between any revision of a file, so I gave it a
try.

It turns out, that the code used for the changeset view can be used to
do just that.

I came up with a quick & dirty hack, that will send you Python and
Trac guys screaming for the door ;-) 

Given that I never ever touched python before, it is nice, that it
works at all :-)

So it is just a proof of concept. If there is someone who wants to
take on, please be my guest. I cannot bring this one up to quality.

To see it in action, apply the attached patches, go to the revision
log of a file and select the "A" & "B" revisions to be compared.

Bye,
        Martin

Attachment (python.patch): text/x-patch, 11 KiB
Attachment (templates.patch): text/x-patch, 6390 bytes
_______________________________________________
Trac mailing list
Trac@...
(Continue reading)

Barry Scott | 2 Nov 2004 14:21
Picon

RE: learning Python/Subversion bindings

You have to read the C Header files and C code to find out how the API
works. Subversion has not documented the API.

I'm not a fan of the SWIG wrappers around SVN and wrote pysvn to give a
documented and python friendly interface to SVN. But that won't help
you in customising Trac.

Barry

> -----Original Message-----
> From: trac-bounces@...
> [mailto:trac-bounces@...]On Behalf Of Greg Wilson
> Sent: 31 October 2004 13:44
> To: trac@...
> Subject: [Trac] learning Python/Subversion bindings
> 
> 
> Hi.  Does anyone have pointers to documentation about how to use the
> Python bindings for Subversion?  I've read through the Trac source, and
> would like to experiment with a few customizations, but am having trouble
> finding any tutorials or examples on-line.  Pointers would be welcome...
> 
> Thanks,
> Greg
> _______________________________________________
> Trac mailing list
> Trac@...
> http://lists.edgewall.com/mailman/listinfo/trac
> 
> 
(Continue reading)

Juanma Barranquero | 3 Nov 2004 02:43
Picon
Favicon

Changes to core in [1003]

Hi.

I don't think the changes to trac/core.py in [1003], to escape error
messages, are a good idea.  On authentication errors, before you
received a nice two-entries menu, with appropriate links to trac/login
or to create a new session, while now all you receive is a box with
escaped html:

 "Session cookie requires authentication. <p>Please choose
  action:</p><ul><li><a href="/trac/login">Log in and continue
  session</a></li><li><a href="/trac/settings?newsession=1">Create new
  session (no login required)</a></li></ul>"

BTW, using the most recent 0.8-pre, straight from the repo trunk, I'm
really having a lot of problems with authentication. I get the message
above every single time I hit "logout". Any idea about what can be wrong?
I suspected a problem in my setup, but it happens to me on three
different machines, and both with IE and Firefox.

                                                           /L/e/k/t/u
Christopher Lenz | 3 Nov 2004 10:28
Picon
Picon
Gravatar

Re: Changes to core in [1003]

Am 03.11.2004 um 02:43 schrieb Juanma Barranquero:
> I don't think the changes to trac/core.py in [1003], to escape error
> messages, are a good idea.  On authentication errors, before you
> received a nice two-entries menu, with appropriate links to trac/login
> or to create a new session, while now all you receive is a box with
> escaped html:
>
>  "Session cookie requires authentication. <p>Please choose
>   action:</p><ul><li><a href="/trac/login">Log in and continue
>   session</a></li><li><a href="/trac/settings?newsession=1">Create new
>   session (no login required)</a></li></ul>"

Doh. That's what you get when checking in changes too late in the night 
:-P
Should be fixed in http://projects.edgewall.com/trac/changeset/1004. 
(The abysmal log message is what you get when checking in before having 
had that first cup of coffee).

Now only messages of unknown exceptions are escaped.

> BTW, using the most recent 0.8-pre, straight from the repo trunk, I'm
> really having a lot of problems with authentication. I get the message
> above every single time I hit "logout". Any idea about what can be 
> wrong?
> I suspected a problem in my setup, but it happens to me on three
> different machines, and both with IE and Firefox.

That is an artifact of the session support. As soon as an authenticated 
user has a persistent session, you can not really log out of the 
system, as that would mean your accessing information normally 
(Continue reading)

Juanma Barranquero | 3 Nov 2004 10:48

RE: Changes to core in [1003]


> Doh. That's what you get when checking in changes too late in 
> the night 
> :-P
> Should be fixed in http://projects.edgewall.com/trac/changeset/1004. 

Thanks!

> (The abysmal log message is what you get when checking in 
> before having had that first cup of coffee).

:)

> That is an artifact of the session support. As soon as an 
> authenticated user has a persistent session, you can not really
> log out of the system, as that would mean your accessing information
> normally protected by auth. Or something like that.

OK, I see.

Thanks,
         Juanma

Gmane