Roundup Tracker - Issues

Issue 2551311

classification
Unable to login when using roundup-server (Bad request syntax)
Type: behavior Severity: normal
Components: Documentation Versions: devel
process
Status: new
:
: : ivanov, rouilj
Priority: :

Created on 2023-12-23 03:22 by ivanov, last changed 2023-12-25 06:42 by rouilj.

Messages
msg7911 Author: [hidden] (ivanov) Date: 2023-12-23 03:22
I tried to use roundup-server for my local Roundup test tracker and ran
into an issue logging into the tracker. 

I use the latest code from the Roundup repository.

The issue is reproduced when I use the postgresql, sqlite or anydbm
backend. I haven't tried the mysql backend, but I think it should be the
same with mysql. 

The issue is occurs only when I use roundup-server command. If I use any
database backend with roundup-demo, I can login and create users or
issues using the web interface. I can then see the created items in the
selected database.

The issue is also reproduced using the classic, devel, jinja2 or minimal
template. I haven't tried others.

Also, I haven't tried checking the wsgi interface for this issue.

Steps to reproduce:

1. roundup-admin -i classic install classic anydbm

2. Set tracker_web to http://localhost:8080/, mail_domain and mail_host
to localhost, logging_level to DEBUG

3. roundup-admin -i classic init

4. roundup-server classic=classic

5. Try logging in using admin credentials

Console log:

Roundup server started on localhost:8080
2023-12-23 02:21:16,788 DEBUG opendb
anydbm.open('/home/user/Projects/www/roundup_dev/classic/db/nodes.user',
'c')
2023-12-23 02:21:16,789 DEBUG get user1
2023-12-23 02:21:16,790 DEBUG get user2
2023-12-23 02:21:16,790 DEBUG opendb
anydbm.open('/home/user/Projects/www/roundup_dev/classic/db/nodes.user',
'c')
2023-12-23 02:21:16,791 DEBUG get user1 cached
2023-12-23 02:21:16,791 DEBUG get user2 cached
2023-12-23 02:21:16,797 DEBUG get user2 cached
2023-12-23 02:21:16,798 DEBUG get user2 cached
2023-12-23 02:21:16,806 DEBUG get user2 cached
2023-12-23 02:21:16,807 DEBUG get user2 cached
2023-12-23 02:21:16,808 DEBUG get user2 cached
2023-12-23 02:21:16,808 DEBUG get user2 cached
2023-12-23 02:21:16,808 DEBUG get user2 cached
2023-12-23 02:21:16,812 DEBUG opendb
anydbm.open('/home/user/Projects/www/roundup_dev/classic/db/nodes.user',
'c')
2023-12-23 02:21:16,812 DEBUG get user1 cached
2023-12-23 02:21:16,813 DEBUG get user2 cached
2023-12-23 02:21:16,814 DEBUG get user2 cached
2023-12-23 02:21:16,815 DEBUG get user2 cached
2023-12-23 02:21:16,818 DEBUG get user2 cached
2023-12-23 02:21:16,819 DEBUG get user2 cached
2023-12-23 02:21:16,819 DEBUG get user2 cached
2023-12-23 02:21:16,819 DEBUG get user2 cached
2023-12-23 02:21:16,820 DEBUG get user2 cached
2023-12-23 02:21:16,820 DEBUG get user2 cached
2023-12-23 02:21:16,820 DEBUG get user2 cached
2023-12-23 02:21:16,821 DEBUG opendb
anydbm.open('/home/user/Projects/www/roundup_dev/classic/db/nodes.issue',
'c')
2023-12-23 02:21:16,823 DEBUG get user2 cached
2023-12-23 02:21:16,823 DEBUG get user2 cached
127.0.0.1 - - [23/Dec/2023 02:21:16] "GET /classic/index HTTP/1.1" 200 -
127.0.0.1 - - [23/Dec/2023 02:21:24] "POST / HTTP/1.1" 302 -
127.0.0.1 - - [23/Dec/2023 02:21:24] code 400, message Bad request
syntax
('__login_name=admin&__login_password=admin&%40action=Login&%40csrf=rhzenMT69qfwqEZkMto4PYI4BM3EGIuDIul8rFxsb_iMwsLJg-hlpw&__came_from=http%3A%2F%2Flocalhost%3A8080%2Findex&%40columns=id%2Cactivity%2Ctitle%2Ccreator%2Cassignedto%2Cstatus&%40sort=-activity&%40group=priority&%40filter=status&status=-1%2C1%2C2%2C3%2C4%2C5%2C6%2C7&%40pagesize=50&%40startwith=0')
127.0.0.1 - - [23/Dec/2023 02:21:24]
"__login_name=admin&__login_password=admin&%40action=Login&%40csrf=rhzenMT69qfwqEZkMto4PYI4BM3EGIuDIul8rFxsb_iMwsLJg-hlpw&__came_from=http%3A%2F%2Flocalhost%3A8080%2Findex&%40columns=id%2Cactivity%2Ctitle%2Ccreator%2Cassignedto%2Cstatus&%40sort=-activity&%40group=priority&%40filter=status&status=-1%2C1%2C2%2C3%2C4%2C5%2C6%2C7&%40pagesize=50&%40startwith=0"
400 -
2023-12-23 02:21:24,817 DEBUG opendb
anydbm.open('/home/user/Projects/www/roundup_dev/classic/db/nodes.user',
'c')
2023-12-23 02:21:24,818 DEBUG get user1
2023-12-23 02:21:24,818 DEBUG get user2
2023-12-23 02:21:24,819 DEBUG opendb
anydbm.open('/home/user/Projects/www/roundup_dev/classic/db/nodes.user',
'c')
2023-12-23 02:21:24,819 DEBUG get user1 cached
2023-12-23 02:21:24,819 DEBUG get user2 cached
2023-12-23 02:21:24,820 DEBUG get user2 cached
2023-12-23 02:21:24,820 DEBUG get user2 cached
2023-12-23 02:21:24,824 DEBUG get user2 cached
2023-12-23 02:21:24,824 DEBUG get user2 cached
2023-12-23 02:21:24,824 DEBUG get user2 cached
2023-12-23 02:21:24,825 DEBUG get user2 cached
2023-12-23 02:21:24,825 DEBUG get user2 cached
2023-12-23 02:21:24,826 DEBUG opendb
anydbm.open('/home/user/Projects/www/roundup_dev/classic/db/nodes.user',
'c')
2023-12-23 02:21:24,826 DEBUG get user1 cached
2023-12-23 02:21:24,826 DEBUG get user2 cached
2023-12-23 02:21:24,828 DEBUG get user2 cached
2023-12-23 02:21:24,828 DEBUG get user2 cached
2023-12-23 02:21:24,830 DEBUG get user2 cached
2023-12-23 02:21:24,830 DEBUG get user2 cached
2023-12-23 02:21:24,830 DEBUG get user2 cached
2023-12-23 02:21:24,830 DEBUG get user2 cached
2023-12-23 02:21:24,831 DEBUG get user2 cached
2023-12-23 02:21:24,831 DEBUG get user2 cached
2023-12-23 02:21:24,831 DEBUG get user2 cached
2023-12-23 02:21:24,831 DEBUG opendb
anydbm.open('/home/user/Projects/www/roundup_dev/classic/db/nodes.issue',
'c')
2023-12-23 02:21:24,832 DEBUG get user2 cached
2023-12-23 02:21:24,832 DEBUG get user2 cached
127.0.0.1 - - [23/Dec/2023 02:21:24] "GET /classic/index HTTP/1.1" 200 -
127.0.0.1 - - [23/Dec/2023 02:22:24] Request timed out: timeout('timed
out')

$ python3 --version
Python 3.9.18
msg7912 Author: [hidden] (rouilj) Date: 2023-12-23 16:18
What happens if you change TRACKER_WEB from http://localhost:8080/ to 
http://localhost:8080/classic/?

Can you log into the tracker then?
msg7914 Author: [hidden] (ivanov) Date: 2023-12-25 05:38
> What happens if you change TRACKER_WEB from http://localhost:8080/ to 
> http://localhost:8080/classic/?
> 
> Can you log into the tracker then?

Thank you, John, this works fine. Do I understand correctly that this is
how it was intended? Perhaps I didn't look at the documentation
carefully.
msg7915 Author: [hidden] (rouilj) Date: 2023-12-25 06:42
Hi Ivanov:

> Do I understand correctly that this is how it was intended?

Yes. By default roundup-server's root will do one of two things:

  1) provide an index of all defined trackers. So for:

        roundup-server ... classic=classic devel=devel jinja=../jinja

     it will generate an index page with three trackers on it.

  2) If there is only one tracker, it will display that one tracker:

          roundup-server ... classic=classic

     will display the classic tracker. However the classic tracker has to be
     configured to use the correct web path at /classic/. (IIRC this will happen
     with the roundup-demo tracker if you leave off /demo/.) 

You can also use the -i command line parameter (or template roundup-server config file
setting (not to be confused with the tracker config.ini)) to create a TAL processed
template. I don't know what values are supported for the template. It has some dictionary
of trackers that are passed in.

> Perhaps I didn't look at the documentation carefully.

No this is a case where it's not explicitly stated anywhere. The admin-guide and man
page talk about the index. I suspected you had misconfigured the web and were getting
the auto-redirect to your tracker. I went looking for something that explicitly
described what the / path does, but I didn't find anything.

If you want to run a tracker at the root, I think you have to use a reverse proxy to mangle
the url or another deployment method: wsgi, cgi, mod_perl etc. I played a little with
'.=path', '=path' etc. to see if there was a magic incantation. But it looks like
/ always redirects to /index.

This is probably a ticket for better documentation in the admin guide.
History
Date User Action Args
2023-12-25 06:42:07rouiljsetmessages: + msg7915
2023-12-25 05:45:56ivanovsettype: behavior
components: + Documentation
versions: + devel
2023-12-25 05:38:02ivanovsetmessages: + msg7914
2023-12-23 16:18:49rouiljsetnosy: + rouilj
messages: + msg7912
2023-12-23 03:22:50ivanovcreate