minor secure fixes
This commit is contained in:
@@ -29,8 +29,10 @@ bool session_manager::validate_pass(){
|
||||
this->write_data("pass");
|
||||
if(this->data->get_admin(user)){
|
||||
this->write_data("admin");
|
||||
this->admin=true;
|
||||
}else{
|
||||
this->write_data("norma");
|
||||
this->admin=false;
|
||||
}
|
||||
this->user=user;
|
||||
return true;
|
||||
@@ -50,11 +52,11 @@ void session_manager::start_dialog(){
|
||||
this->send_information();
|
||||
}else if(strcmp(buffer, "remv")==0){
|
||||
this->remove();
|
||||
}else if(strcmp(buffer,"uinf")==0){
|
||||
}else if((strcmp(buffer,"uinf")==0)&&this->admin){
|
||||
this->send_user_info();
|
||||
}else if(strcmp(buffer,"cusr")==0){
|
||||
}else if((strcmp(buffer,"cusr")==0)&&this->admin){
|
||||
this->create_user();
|
||||
}else if(strcmp(buffer,"rusr")==0){
|
||||
}else if((strcmp(buffer,"rusr")==0)&&this->admin){
|
||||
this->remove_user();
|
||||
}else if((strcmp(buffer,"exit")==0)||(n_read==0)){
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user