Oracle password contains slashes

For programming and general questions on Zend Framework

Oracle password contains slashes

Postby linxlad on Wed Aug 01, 2012 4:16 pm

Hi there

I am using the zend:auth adapters with an oracle connection.
I am trying to authenticate a user at login, the problem is the authentication goes off without a hitch if the user
enters regular alphanum but when a password is like this for example "IUCJAC\_" the validation for authentication returns false.

I have tried:
Zend_View::escape();
Zend_DB_Adapter::quote();

php's addslashed();

to no avail.

Any ideas?

Code: Select all
    public function authAction()
    {
        //Returns encrypted password
        $newpass = new Application_Model_Discoverpw();
        $this->getHelper('viewRenderer')->setNoRender();
        if(!empty($_POST))
        {
            $password =$newpass->encode_password(trim($_POST['password']));
            $slashedPW =  $db->quote($password);
            $formValues = array(
            'email' => $_POST['email'], 'password' => $slashedPW);
            $sql = "SELECT * from PI_USER_TABLE WHERE EMAIL='".$_POST['email']."' AND ENCODED_PW='".$slashedPW."'";
            if ($this->_process($formValues)) {

                // We're authenticated! Redirect to the home page
                //echo '{"success":true}';
                $this->_helper->redirector('index', 'sam');

                //$this->_helper->redirector('index', 'index');

            } else {
               throw new Zend_Auth_Exception('Login failed! '. $sql);
                //echo 'oh no!';
            }
        } else {
            //Redirect to login page if no $_POST values found
            $this->_helper->redirector('login', 'userauth');
        }
    }
linxlad
 
Posts: 1
Joined: Wed Aug 01, 2012 4:10 pm

Return to Zend Framework

Who is online

Users browsing this forum: No registered users and 5 guests