GNOME Bugzilla – Bug 703512
Enabling "Require password" and not typing a password will have inconsistent behavior
Last modified: 2013-07-30 13:57:40 UTC
User can notice that Enabling "Require password" and not typing a password will have inconsistent behavior. On connect a password will be required but user did not type any password, thus will be impossible to connect. Steps : 1. Boot 2. Go to settings - sharing 3. Open Screen sharing 4. Enable all options but leave the password blank 5. Connect with vinagre to localhost 6. Observe password is asked but there is no password typed making the connection impossible Expected outcome If no password is typed, system will not asked for a password on connect OR system will enforce for a password to be typed Actual outcome Leaving the password field blank will require password on connect, but no password has been set.
Created attachment 250375 [details] [review] proposed patch
Review of attachment 250375 [details] [review]: ::: panels/sharing/cc-sharing-panel.c @@ +869,3 @@ + + if (gtk_switch_get_active (pw_switch) && + strlen (gtk_entry_get_text (pw_entry)) == 0) strlen() will crash with NULL pointers, please make this more robust. @@ +870,3 @@ + if (gtk_switch_get_active (pw_switch) && + strlen (gtk_entry_get_text (pw_entry)) == 0) + { brace on the same line as the conditional.
Created attachment 250466 [details] [review] proposed patch, v2 fixed the comments. once approved, may I push to 3.8 as well?
Review of attachment 250466 [details] [review]: Looks good.
thanks, pushed to master and gnome-3-8.