Confirmed users
596
edits
(→XML: login page URL: Require HTTPS) |
(→XML: Put usernameField in its own element) |
||
| Line 156: | Line 156: | ||
The login button might not be an HTML button, just a div, so | The login button might not be an HTML button, just a div, so | ||
to trigger it, send a click event to it. | to trigger it, send a click event to it. | ||
HTTPS is required for the URL. --> | HTTPS is required for the URL. --> | ||
<loginAutomaticDOM | <loginAutomaticDOM url="https://mail.example.com/login/"> | ||
<!-- What to fill into the usernameField. | |||
Format is the same as for <username> within <incomingServer>, | |||
including placeholders. See below for valid placeholders. --> | |||
<username>%EMAILADDRESS%</username> | |||
<!-- Allows to find the textfield on the page, to fill it out. | |||
The id attribute give the DOM ID, | |||
The name attribute give the DOM name attribute. | |||
One or both of id and name attributes must exist. | |||
Try the ID first (e.g. using getElementById()), if existing. | |||
Otherwise, try finding the element by name. | |||
Don't treat the IDs given in this XML file as trusted, | |||
but before using them, verify the format | |||
(e.g. only characters and digits for IDs). | |||
If you use powerful functions like jQuery, and the XML returns | |||
you code in the username ID, and you feed it unchecked to jQuery, | |||
it may be executed. --> | |||
<usernameField id="email_field" name="email" /> | |||
<passwordField name="password" /> | |||
<!-- The submit button to trigger the server submit | |||
after filling in the fields. | |||
id and name attributes: See <usernameField> --> | |||
<loginButton id="submit_button" name="login"/> | |||
</loginAutomaticDOM> | |||
</webMail> | </webMail> | ||