Fix T38640: password values showed in tooltips

also disable copying password text.
This commit is contained in:
2014-02-15 12:05:51 +11:00
parent 01d9bbaa5e
commit 2413b444d0
2 changed files with 16 additions and 6 deletions

View File

@@ -1677,6 +1677,13 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
return;
}
if (mode == 'c') {
/* disallow copying from any passwords */
if (but->rnaprop && (RNA_property_subtype(but->rnaprop) == PROP_PASSWORD)) {
return;
}
}
if (mode == 'v') {
/* extract first line from clipboard in case of multi-line copies */
int pbuf_len;