Guest User

Untitled

a guest
Feb 21st, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. const char *sent_pw = NULL;
  2. char *user = r->connection->user;
  3. int ret = ap_get_basic_auth_pw(r, &sent_pw);
  4. if (ret != OK)
  5. {
  6. return ret;
  7. }
  8. if(!(user && sent_pwd && db_verify(user, sent_pw)){
  9. ap_note_basic_auth_failure(r);
  10. ap_log_reason("User did not authenticate", r->uri, r);
  11. return HTTP_UNAUTHORIZED;
  12. }
Add Comment
Please, Sign In to add comment