Hey all,
I am trying to connect to the web interface found at
http://lcl.uniroma1.it/sso/jsp/welcome.faces using curl. This first requires login information to be entered at
http://lcl.uniroma1.it/sso/index.jsp, but I am having an issue with the login process. I am trying to submit the following form via POST:
Code:
<form action="j_security_check" method="post" id="login_form" name="login_form">
<center>
<table style="background: #cac1cf;FONT-SIZE: 12px;">
<tr>
<td align="center" colspan="2">Please enter your username and password:</td>
</tr>
<tr>
<td align="right">Username</td>
<td><input name="j_username" style="width: 250px" id="j_username" type="text"/></td>
</tr>
<tr>
<td align="right">Password</td>
<td><input style="width: 250px" name="j_password" id="j_password" type="password"/></td>
</tr>
<tr>
<td colspan="2" align="center">
<input value="Enter" name="enter" type="submit"/>
<input value="Clear" name="Clear" type="reset"/>
</td>
</tr>
</table>
</center>
</form>
The command that I am using for this is the following:
Code:
curl -c cookies -b cookies -L -d "j_username=user%40domain.com&j_password=pass" http://lcl.uniroma1.it/sso/j_security_check
The command is properly formatted as far as I can tell. I tested it with another website using a similar authentication scheme using different POST variables specific to the form and it worked fine.
When I run the above command with the -v tag, it reveals this:
Code:
* Connected to lcl.uniroma1.it (151.100.4.74) port 80 (#0)
> POST /sso/j_security_check HTTP/1.1
> User-Agent: curl/7.21.0 (i686-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: lcl.uniroma1.it
> Accept: */*
> Content-Length: 44
> Content-Type: application/x-www-form-urlencoded
>
} [data not shown]
< HTTP/1.1 408 The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser
< Date: Sat, 29 Jan 2011 15:26:41 GMT
< Server: Apache-Coyote/1.1
< Content-Type: text/html;charset=utf-8
< Content-Length: 1554
< Connection: close
<
{ [data not shown]
103 1554 100 1554 0 52 5081 170 --:--:-- --:--:-- --:--:-- 10223*
Closing connection #0
I cannot tell why the login timeout is expired when I try to do this, and my investigation toward this end has been fruitless. I saw a brief snippet on Google that vaguely suggested that the underscores in the domain name were at fault, but replacing these with their encoded counterparts did nothing to resolve the issue (that, and underscores should be fine when sent unencoded according to the standards).
I have extensively perused the man pages and have come up with nothing to adequately explain this behavior. I also talked to a friend who has worked with curl in his line of work, but he mostly has experience in the context of PHP and has not dealt with this issue before.
I am running GNU/Linux 2.6.35-22-generic-pae. If additional system details are required, please let me know. Help is very much appreciated.
Thanks,
fyndr