hey guys,

as i had some free time this afternoon i thought of fixing this
vulnerability, but as vivia told me, it's more a feature than a
vulnerability, because it can be useful to logout and still be able to say
bye or something. so vivia proposed to add an option to disable closing
windows after logout, to be able to use that feature without risking a
vulnerability to those who don't know of this feature. the default value
would be closing the windows. what do you think?

mirko

2007/7/26, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:

Revision: 8929
          http://amsn.svn.sourceforge.net/amsn/?rev=8929&view=rev
Author:   baaazen
Date:     2007-07-26 05:36:00 -0700 (Thu, 26 Jul 2007)

Log Message:
-----------
fix for closing all chatwindows after logout as this could be a
vulnerability

Modified Paths:
--------------
    trunk/amsn/chatwindow.tcl
    trunk/amsn/gui.tcl

Modified: trunk/amsn/chatwindow.tcl
===================================================================
--- trunk/amsn/chatwindow.tcl   2007-07-26 09:31:16 UTC (rev 8928)
+++ trunk/amsn/chatwindow.tcl   2007-07-26 12:36:00 UTC (rev 8929)
@@ -341,6 +341,29 @@
                return [llength [set ::ChatWindow::containerwindows($w)]]
        }

+       proc CloseAllWindows {} {
+               variable windows
+               variable containerwindows
+
+               foreach win $windows {
+                       if {![winfo exists $win]} {
+                               continue
+                       }
+                       set upwin [winfo toplevel $win]
+
+                       if {[info exists containerwindows($upwin)]} {
+                               # this is a tabbed window, so closing all
tabs does the trick
+                               CloseAll $upwin
+                               destroy $upwin
+                       } else {
+                               # this seems to be a normal window, so
close the usual way
+                               Close $upwin
+                       }
+               }
+
+               set windows [list]
+       }
+
        proc CloseAll { w } {
                variable containerwindows
                variable containers

Modified: trunk/amsn/gui.tcl
===================================================================
--- trunk/amsn/gui.tcl  2007-07-26 09:31:16 UTC (rev 8928)
+++ trunk/amsn/gui.tcl  2007-07-26 12:36:00 UTC (rev 8929)
@@ -4114,6 +4114,9 @@
        set save_idx [$menu index "[trans savecontacts]"]
        set load_idx [$menu index "[trans loadcontacts]"]
        enableEntries $menu [list $add_idx $del_idx $prop_idx $grp_add_idx
$grp_del_idx $grp_ren_idx $hist_idx $cam_idx $save_idx $load_idx] 0
+
+       # close all chatwindows
+       ::ChatWindow::CloseAllWindows
}

proc ShowFirstTimeMenuHidingFeature { parent } {


This was sent by the SourceForge.net collaborative development platform,
the world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Amsn-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/amsn-commits

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Amsn-devel mailing list
Amsn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amsn-devel

Reply via email to