[asterisk-commits] bbryant: trunk r287763 - in /trunk: ./ apps/app_meetme.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Sep 20 19:04:58 CDT 2010


Author: bbryant
Date: Mon Sep 20 19:04:54 2010
New Revision: 287763

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=287763
Log:
Merged revisions 287760 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r287760 | bbryant | 2010-09-20 20:00:23 -0400 (Mon, 20 Sep 2010) | 30 lines
  
  Merged revisions 287759 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r287759 | bbryant | 2010-09-20 19:58:26 -0400 (Mon, 20 Sep 2010) | 23 lines
    
    Merged revisions 287758 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r287758 | bbryant | 2010-09-20 19:57:08 -0400 (Mon, 20 Sep 2010) | 16 lines
      
      Fix misvalidation of meetme pins in conjunction with the 'a' MeetMe flag.
      
      When using the 'a' MeetMe flag and having a user and admin pin setup for your
      conference, using the user pin would gain you admin priviledges. Also, when no
      user pin was set, an admin pin was, the 'a' MeetMe flag wasn't used, and the
      user tried to enter a conference then they were still prompted for a pin and
      forced to hit #.
      
      (closes issue #17908)
      Reported by: kuj
      Patches:
            pins_2.patch uploaded by kuj (license 1111)
            Tested by: kuj
      
            Review: [full review board URL with trailing slash]
    ........
  ................
................

Modified:
    trunk/   (props changed)
    trunk/apps/app_meetme.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: trunk/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_meetme.c?view=diff&rev=287763&r1=287762&r2=287763
==============================================================================
--- trunk/apps/app_meetme.c (original)
+++ trunk/apps/app_meetme.c Mon Sep 20 19:04:54 2010
@@ -4298,9 +4298,13 @@
 					res = -1;
 				}
 			} else {
-				if (((!ast_strlen_zero(cnf->pin) &&
-				    !ast_test_flag64(&confflags, CONFFLAG_ADMIN)) ||
-				    !ast_strlen_zero(cnf->pinadmin)) &&
+				if (((!ast_strlen_zero(cnf->pin)       &&
+					!ast_test_flag64(&confflags, CONFFLAG_ADMIN)) ||
+				     (!ast_strlen_zero(cnf->pinadmin)  &&
+				     	 ast_test_flag64(&confflags, CONFFLAG_ADMIN)) ||
+			    	     (!ast_strlen_zero(cnf->pin) &&
+			    	     	 ast_strlen_zero(cnf->pinadmin) &&
+			    	     	 ast_test_flag64(&confflags, CONFFLAG_ADMIN))) &&
 				    (!(cnf->users == 0 && cnf->isdynamic))) {
 					char pin[MAX_PIN] = "";
 					int j;
@@ -4315,9 +4319,11 @@
 							res = ast_app_getdata(chan, "conf-getpin", pin + strlen(pin), sizeof(pin) - 1 - strlen(pin), 0);
 						}
 						if (res >= 0) {
-							if (!strcasecmp(pin, cnf->pin) ||
-							    (!ast_strlen_zero(cnf->pinadmin) &&
-							     !strcasecmp(pin, cnf->pinadmin))) {
+							if ((!strcasecmp(pin, cnf->pin) &&
+							     (ast_strlen_zero(cnf->pinadmin) ||
+							      !ast_test_flag64(&confflags, CONFFLAG_ADMIN))) ||
+							     (!ast_strlen_zero(cnf->pinadmin) &&
+							      !strcasecmp(pin, cnf->pinadmin))) {
 								/* Pin correct */
 								allowretry = 0;
 								if (!ast_strlen_zero(cnf->pinadmin) && !strcasecmp(pin, cnf->pinadmin)) {




More information about the asterisk-commits mailing list