minor secure fixes

This commit is contained in:
2020-05-27 13:15:06 +02:00
parent a21f94bb69
commit 782507ecf3
6 changed files with 8 additions and 10 deletions

View File

@@ -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;