Hello,
I try to post a form to log into a site built using Contao.
Instead of the usual referrer type login, Contao generates a token, that must be included like:
<input type="hidden" name="REQUEST_TOKEN" value="51ffe68a72a1c96b535619fb4500a538">
A full Form POST would look like:
FORM_SUBMIT=tl_login&REQUEST_TOKEN=51ffe68a72a1c96b535619fb4500a538&username=AnyName&password=AnyPWD
WebCopy seems to be using static forms. Or is there a way I can build a proper response using the Request_Token?
Herbert
P.S. the source of the form looks like this:
<form action="archiv.html" id="tl_login" method="post">
<div class="formbody">
<input type="hidden" name="FORM_SUBMIT" value="tl_login">
<input type="hidden" name="REQUEST_TOKEN" value="51ffe68a72a1c96b535619fb4500a538">
<table>
<tr class="row_0 row_first">
<td class="col_0 col_first"><label for="username">Benutzername</label></td>
<td class="col_1 col_last"><input type="text" name="username" id="username" class="text" value=""></td>
</tr>
<tr class="row_1">
<td class="col_0 col_first"><label for="password">Passwort</label></td>
<td class="col_1 col_last"><input type="password" name="password" id="password" class="text password" value=""></td>
</tr>
<tr class="row_2 row_last">
<td class="col_0 col_first"> </td>
<td class="col_1 col_last"><div class="submit_container"><input type="submit" class="submit" value="Anmelden"></div></td>
</tr>
</table>
</div>
</form>
Herbert,
Unfortunately, as you have surmised WebCopy currently doesn't handle dynamic tokens, but only the fixed values you provide.
An enhancement was logged about 6 months ago to read the existing form data and construct the full message by combining your values with theirs, but this hasn't been done yet. Typically I can't give you a time frame yet as I'm still trying to work out the cause of a couple of bugs that aren't being picked up by our own tests.
Sorry for the inconvenience. Seems to be all I say on these forums, never any good news!
Regards;
Richard Moss