Hi,
I have configured a MediaWiki (v1.13.2) server in my intranet and Im trying to log in from another server in the same net. To get it, I reuse the login form of the later site (called main_login), calling the following javascript function when it is submitted (onsubmit):
<script>
function loginMediawiki() {
document.wiki_login.wpName.value=document.main_login.username.value;
document.wiki_login.wpPassword.value=document.main_login.passwd.value;
document.wiki_login.submit();
return true;
}
</script>
<form action="/mediawiki/index.php?title=Especial:UserLogin&action=submitlogin&typ e=login" method=POST name="wiki_login" target="wiki_login_window">
<input type="hidden" name="wpName" value="">
<input type="hidden" name="wpPassword" value="">
<input type="hidden" name="wpLoginattempt" value="Registrarse/Entrar">
</form>
At first site, it seems to work: a new window appears and states that the user has logged in successfully. But in fact does not, because when I click on any link that requires authorization, it asks me to log in first to see the content. It is not until I log in using MediaWikis login form that Im allowed to access all restricted content.
Ive compared the POSTs generated by my form and by MediaWikis form and they are much the same, excepting the Referrer header (as the form is sent from different sites. So I do not know why it does not work, maybe there is some kind of initialization that is necessary and is being bypassed using the external form? Anyway, is there a way to get logged in MediaWiki that way?
Thanks in advance!
Pablo
mediawiki-l@lists.wikimedia.org