Commit 29eec1465cb9914620e610709f16340d25b6c9b8

Authored by perry.werneck@gmail.com
1 parent 67115b3c

Corrigindo tratamento de campos de senha na exportação para html

Showing 1 changed file with 7 additions and 4 deletions   Show diff stats
html.c
... ... @@ -178,13 +178,15 @@
178 178  
179 179 }
180 180  
181   - static void open_input(struct html_info *info, int addr)
  181 + static void open_input(struct html_info *info, int addr, const char *type)
182 182 {
183 183 char name[30];
184 184  
185 185 snprintf(name,29,"F%04d",addr);
186 186  
187   - append_string(info,"<input type=\"text\" name=\"");
  187 + append_string(info,"<input type=\"");
  188 + append_string(info,type);
  189 + append_string(info,"\" name=\"");
188 190 append_string(info,name);
189 191 append_string(info,"\"");
190 192 info->mode = HTML_MODE_INPUT_TEXT;
... ... @@ -256,9 +258,10 @@
256 258 if(!FA_IS_PROTECTED(fa))
257 259 {
258 260 // Input field
259   - char *text = lib3270_get_field_at(session,baddr+col+1);
  261 + unsigned char attr = get_field_attribute(session,baddr+col+1);
  262 + char * text = lib3270_get_field_at(session,baddr+col+1);
260 263  
261   - open_input(&info,baddr+col+1);
  264 + open_input(&info,baddr+col+1,FA_IS_ZERO(attr) ? "password" : "text");
262 265  
263 266 if(text)
264 267 {
... ...