Hi  Alll

i need to Grab request password to insert in database if
Cleartext-Password  is "import" so i write this unlang script in
authenticate section :


Auth-Type PAP {
        pap {
            reject = 1
        }
            if (reject) {

                if ("%{control:Cleartext-Password}"=="import" ) {

                ok
                    update control {
                        password-import = "%{sql:SELECT
change_impoprt_password
('%{User-Name}'::varchar,'%{User-Password}'::varchar)}"
                        Log-State := "New Password Is Imported"
                    }

                }

                else {

                    if (("%{control:Bad-Password-Pool}") &&
("%{control:Bad-Password-Pool}" != "" ) ) {

                    ok

                        update control {
                            Auth-Type := "Accept"
                            Pool-Name := "%{control:Bad-Password-Pool}"
                            Log-State := "PAP Password Is Not Correct"
                        }
                        update reply {
                            Reply-Message = "Your Password in not correct
in system"
                        }


                    }
                    else {

                        update control {
                            Log-State := "PAP Password Is Not Correct -
Reject"
                            Auth-Type := "Reject"
                        }
                        update reply {
                            Reply-Message := "Your Password in not correct
in system"
                        }

                    }
                }
        ok
        }
    }


but if user use symbols like ! @#& or any character that is based on  ASCII
character  i can not get  real password character for example :

import password is : "test!@#"
request:user-password is   : "test=21@=23"

do we have any way to get or convert request:user-password to none ASCII .
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to