1
votes

i want to give my users the option to login to my cakephp domain from my maindomain (which is not a cakephp application)

for this purpose i have created the following:

      <header>
        <h2 id="loginHeader">Login</h2>
    </header>
    <form id="bloglic-login" action="http://www.myCakeApplication.com/cake2/index.php/users/login" method="post" name="blogliclogin">
        <input id="UserEmail" type="text" placeholder="Email" name="data[User][username]" value="" >
        <input id="UserPassword" type="password" placeholder="Password" name="data[User][password]" value=""/>
        <a class="forgot" href="http://system.bloglic.com/users/forgot_password">Forgot your password?</a>
        <button class="signup" id="button-signup" type="submit">Submit</button>
    </form>
</section>

Now as you can see this form should access my usersController and the action login with a post request.

However when i click submit i get a cakephp error saying the request has blackholed.

Now i think the reason for this is that my form is not following the cake convention. But how can i avoid this error and make my users able to login?

im using Cakephp version 2.3. I am also using ACL to administrate my users

1

1 Answers

4
votes

The blackhole is from the Security Component. To answer your question, read the "Disabling Security Component for Specific Actions" section.

Or (I'm not sure), you might be able to submit from another site if you disable CSRF protection (worth a try)