phpslash-commit Mailing List for phpSlash (Page 55)
Brought to you by:
joestewart,
nhruby
This list is closed, nobody may subscribe to it.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(11) |
Nov
(59) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(52) |
Feb
(77) |
Mar
(118) |
Apr
(76) |
May
(106) |
Jun
(145) |
Jul
(9) |
Aug
(15) |
Sep
(78) |
Oct
(83) |
Nov
(105) |
Dec
(51) |
2003 |
Jan
(105) |
Feb
(100) |
Mar
(111) |
Apr
(149) |
May
(95) |
Jun
(56) |
Jul
(8) |
Aug
(2) |
Sep
|
Oct
(22) |
Nov
(117) |
Dec
(6) |
2004 |
Jan
(1) |
Feb
|
Mar
(3) |
Apr
(25) |
May
|
Jun
(11) |
Jul
(26) |
Aug
(85) |
Sep
(119) |
Oct
(312) |
Nov
(271) |
Dec
(5) |
2005 |
Jan
(6) |
Feb
|
Mar
|
Apr
(12) |
May
(7) |
Jun
(8) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Joe S. <joe...@us...> - 2003-03-27 18:37:57
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv1228/phpslash-ft Modified Files: VERSION Log Message: Released phpSlash 0.7.1RC1 Index: VERSION =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/VERSION,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** VERSION 28 Feb 2003 15:39:22 -0000 1.16 --- VERSION 27 Mar 2003 18:37:54 -0000 1.17 *************** *** 1 **** ! 0.7 --- 1 ---- ! 0.7.1RC1 |
From: Joe S. <joe...@us...> - 2003-03-27 18:37:43
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv1076/phpslash-ft/public_html Modified Files: config-dist.php3 config.php3 Log Message: Released phpSlash 0.7.1RC1 Index: config-dist.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config-dist.php3,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** config-dist.php3 25 Mar 2003 21:36:51 -0000 1.43 --- config-dist.php3 27 Mar 2003 18:37:40 -0000 1.44 *************** *** 74,78 **** $_PSL = parse_ini_file($psl_inifile, TRUE); ! $_PSL['version'] = '0.7'; /**** START DEBUGGING - Comment or delete this for production! ****/ --- 74,78 ---- $_PSL = parse_ini_file($psl_inifile, TRUE); ! $_PSL['version'] = '0.7.1RC1'; /**** START DEBUGGING - Comment or delete this for production! ****/ Index: config.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config.php3,v retrieving revision 1.186 retrieving revision 1.187 diff -C2 -d -r1.186 -r1.187 *** config.php3 11 Mar 2003 18:39:18 -0000 1.186 --- config.php3 27 Mar 2003 18:37:40 -0000 1.187 *************** *** 60,64 **** } ! $_PSL['version'] = '0.7'; /**** START DEBUGGING - Comment or delete this for production! ****/ --- 60,64 ---- } ! $_PSL['version'] = '0.7.1RC1'; /**** START DEBUGGING - Comment or delete this for production! ****/ |
From: Joe S. <joe...@us...> - 2003-03-27 18:37:43
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv1076/phpslash-ft Modified Files: CHANGES Log Message: Released phpSlash 0.7.1RC1 Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.739 retrieving revision 1.740 diff -C2 -d -r1.739 -r1.740 *** CHANGES 27 Mar 2003 18:33:19 -0000 1.739 --- CHANGES 27 Mar 2003 18:37:39 -0000 1.740 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2003-March-27 12:30PM CST Joe Stewart <joe...@us...> + [R] - Released phpSlash 0.7.1RC1. + - VERSION, config-dist.php3, config.php3 - bumped version for release. + 2003-March-27 11:00AM CST Joe Stewart <joe...@us...> [B] - md5.js, basic/loginformCR.tpl - bug [ 710158 ] md5.js broken with |
From: Joe S. <joe...@us...> - 2003-03-27 18:33:28
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic In directory sc8-pr-cvs1:/tmp/cvs-serv31369/phpslash-ft/public_html/templates/en/basic Modified Files: loginformCR.tpl Log Message: bug [ 710158 ] md5.js broken with passwords using special chars Index: loginformCR.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/loginformCR.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** loginformCR.tpl 21 May 2002 15:02:04 -0000 1.5 --- loginformCR.tpl 27 Mar 2003 18:33:21 -0000 1.6 *************** *** 57,60 **** --- 57,61 ---- <input type="hidden" name="challenge" value="{CHALLENGE}"> <input type="hidden" name="response" value=""> + <input type="hidden" name="setcookie" value=""> </form> <script language="JavaScript"> |
From: Joe S. <joe...@us...> - 2003-03-27 18:33:28
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv31369/phpslash-ft/public_html Modified Files: md5.js Log Message: bug [ 710158 ] md5.js broken with passwords using special chars Index: md5.js =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/md5.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** md5.js 8 Oct 2001 16:45:12 -0000 1.1 --- md5.js 27 Mar 2003 18:33:20 -0000 1.2 *************** *** 1,382 **** ! /* ! * md5.jvs 1.0b 27/06/96 ! * ! * Javascript implementation of the RSA Data Security, Inc. MD5 ! * Message-Digest Algorithm. ! * ! * Copyright (c) 1996 Henri Torgemane. All Rights Reserved. ! * ! * Permission to use, copy, modify, and distribute this software ! * and its documentation for any purposes and without ! * fee is hereby granted provided that this copyright notice ! * appears in all copies. ! * ! * Of course, this soft is provided "as is" without express or implied ! * warranty of any kind. ! * ! * $Id$ ! * ! */ ! ! ! ! function array(n) { ! for(i=0;i<n;i++) this[i]=0; ! this.length=n; ! } ! ! /* Some basic logical functions had to be rewritten because of a bug in ! * Javascript.. Just try to compute 0xffffffff >> 4 with it.. ! * Of course, these functions are slower than the original would be, but ! * at least, they work! ! */ ! ! function integer(n) { return n%(0xffffffff+1); } ! ! function shr(a,b) { ! a=integer(a); ! b=integer(b); ! if (a-0x80000000>=0) { ! a=a%0x80000000; ! a>>=b; ! a+=0x40000000>>(b-1); ! } else ! a>>=b; ! return a; ! } ! ! function shl1(a) { ! a=a%0x80000000; ! if (a&0x40000000==0x40000000) ! { ! a-=0x40000000; ! a*=2; ! a+=0x80000000; ! } else ! a*=2; ! return a; ! } ! ! function shl(a,b) { ! a=integer(a); ! b=integer(b); ! for (var i=0;i<b;i++) a=shl1(a); ! return a; ! } ! ! function and(a,b) { ! a=integer(a); ! b=integer(b); ! var t1=(a-0x80000000); ! var t2=(b-0x80000000); ! if (t1>=0) ! if (t2>=0) ! return ((t1&t2)+0x80000000); ! else ! return (t1&b); ! else ! if (t2>=0) ! return (a&t2); ! else ! return (a&b); ! } ! ! function or(a,b) { ! a=integer(a); ! b=integer(b); ! var t1=(a-0x80000000); ! var t2=(b-0x80000000); ! if (t1>=0) ! if (t2>=0) ! return ((t1|t2)+0x80000000); ! else ! return ((t1|b)+0x80000000); ! else ! if (t2>=0) ! return ((a|t2)+0x80000000); ! else ! return (a|b); ! } ! ! function xor(a,b) { ! a=integer(a); ! b=integer(b); ! var t1=(a-0x80000000); ! var t2=(b-0x80000000); ! if (t1>=0) ! if (t2>=0) ! return (t1^t2); ! else ! return ((t1^b)+0x80000000); ! else ! if (t2>=0) ! return ((a^t2)+0x80000000); ! else ! return (a^b); ! } ! ! function not(a) { ! a=integer(a); ! return (0xffffffff-a); ! } ! ! /* Here begin the real algorithm */ ! ! var state = new array(4); ! var count = new array(2); ! count[0] = 0; ! count[1] = 0; ! var buffer = new array(64); ! var transformBuffer = new array(16); ! var digestBits = new array(16); ! ! var S11 = 7; ! var S12 = 12; ! var S13 = 17; ! var S14 = 22; ! var S21 = 5; ! var S22 = 9; ! var S23 = 14; ! var S24 = 20; ! var S31 = 4; ! var S32 = 11; ! var S33 = 16; ! var S34 = 23; ! var S41 = 6; ! var S42 = 10; ! var S43 = 15; ! var S44 = 21; ! ! function F(x,y,z) { ! return or(and(x,y),and(not(x),z)); ! } ! ! function G(x,y,z) { ! return or(and(x,z),and(y,not(z))); ! } ! ! function H(x,y,z) { ! return xor(xor(x,y),z); ! } ! ! function I(x,y,z) { ! return xor(y ,or(x , not(z))); ! } ! ! function rotateLeft(a,n) { ! return or(shl(a, n),(shr(a,(32 - n)))); ! } ! ! function FF(a,b,c,d,x,s,ac) { ! a = a+F(b, c, d) + x + ac; ! a = rotateLeft(a, s); ! a = a+b; ! return a; ! } ! ! function GG(a,b,c,d,x,s,ac) { ! a = a+G(b, c, d) +x + ac; ! a = rotateLeft(a, s); ! a = a+b; ! return a; ! } ! ! function HH(a,b,c,d,x,s,ac) { ! a = a+H(b, c, d) + x + ac; ! a = rotateLeft(a, s); ! a = a+b; ! return a; ! } ! ! function II(a,b,c,d,x,s,ac) { ! a = a+I(b, c, d) + x + ac; ! a = rotateLeft(a, s); ! a = a+b; ! return a; ! } ! ! function transform(buf,offset) { ! var a=0, b=0, c=0, d=0; ! var x = transformBuffer; ! ! a = state[0]; ! b = state[1]; ! c = state[2]; ! d = state[3]; ! ! for (i = 0; i < 16; i++) { ! x[i] = and(buf[i*4+offset],0xff); ! for (j = 1; j < 4; j++) { ! x[i]+=shl(and(buf[i*4+j+offset] ,0xff), j * 8); ! } ! } ! ! /* Round 1 */ ! a = FF ( a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */ ! d = FF ( d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */ ! c = FF ( c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */ ! b = FF ( b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */ ! a = FF ( a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */ ! d = FF ( d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */ ! c = FF ( c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */ ! b = FF ( b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */ ! a = FF ( a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */ ! d = FF ( d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */ ! c = FF ( c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */ ! b = FF ( b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */ ! a = FF ( a, b, c, d, x[12], S11, 0x6b901122); /* 13 */ ! d = FF ( d, a, b, c, x[13], S12, 0xfd987193); /* 14 */ ! c = FF ( c, d, a, b, x[14], S13, 0xa679438e); /* 15 */ ! b = FF ( b, c, d, a, x[15], S14, 0x49b40821); /* 16 */ ! ! /* Round 2 */ ! a = GG ( a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */ ! d = GG ( d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */ ! c = GG ( c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */ ! b = GG ( b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */ ! a = GG ( a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */ ! d = GG ( d, a, b, c, x[10], S22, 0x2441453); /* 22 */ ! c = GG ( c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */ ! b = GG ( b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */ ! a = GG ( a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */ ! d = GG ( d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */ ! c = GG ( c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */ ! b = GG ( b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */ ! a = GG ( a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */ ! d = GG ( d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */ ! c = GG ( c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */ ! b = GG ( b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */ ! ! /* Round 3 */ ! a = HH ( a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */ ! d = HH ( d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */ ! c = HH ( c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */ ! b = HH ( b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */ ! a = HH ( a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */ ! d = HH ( d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */ ! c = HH ( c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */ ! b = HH ( b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */ ! a = HH ( a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */ ! d = HH ( d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */ ! c = HH ( c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */ ! b = HH ( b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */ ! a = HH ( a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */ ! d = HH ( d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */ ! c = HH ( c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */ ! b = HH ( b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */ ! ! /* Round 4 */ ! a = II ( a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */ ! d = II ( d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */ ! c = II ( c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */ ! b = II ( b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */ ! a = II ( a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */ ! d = II ( d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */ ! c = II ( c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */ ! b = II ( b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */ ! a = II ( a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */ ! d = II ( d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */ ! c = II ( c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */ ! b = II ( b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */ ! a = II ( a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */ ! d = II ( d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */ ! c = II ( c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */ ! b = II ( b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */ ! ! state[0] +=a; ! state[1] +=b; ! state[2] +=c; ! state[3] +=d; ! ! } ! ! function init() { ! count[0]=count[1] = 0; ! state[0] = 0x67452301; ! state[1] = 0xefcdab89; ! state[2] = 0x98badcfe; ! state[3] = 0x10325476; ! for (i = 0; i < digestBits.length; i++) ! digestBits[i] = 0; ! } ! ! function update(b) { ! var index,i; ! ! index = and(shr(count[0],3) , 0x3f); ! if (count[0]<0xffffffff-7) ! count[0] += 8; ! else { ! count[1]++; ! count[0]-=0xffffffff+1; ! count[0]+=8; ! } ! buffer[index] = and(b,0xff); ! if (index >= 63) { ! transform(buffer, 0); ! } ! } ! ! function finish() { ! var bits = new array(8); ! var padding; ! var i=0, index=0, padLen=0; ! ! for (i = 0; i < 4; i++) { ! bits[i] = and(shr(count[0],(i * 8)), 0xff); ! } ! for (i = 0; i < 4; i++) { ! bits[i+4]=and(shr(count[1],(i * 8)), 0xff); ! } ! index = and(shr(count[0], 3) ,0x3f); ! padLen = (index < 56) ? (56 - index) : (120 - index); ! padding = new array(64); ! padding[0] = 0x80; ! for (i=0;i<padLen;i++) ! update(padding[i]); ! for (i=0;i<8;i++) ! update(bits[i]); ! ! for (i = 0; i < 4; i++) { ! for (j = 0; j < 4; j++) { ! digestBits[i*4+j] = and(shr(state[i], (j * 8)) , 0xff); ! } ! } ! } ! ! /* End of the MD5 algorithm */ ! ! function hexa(n) { ! var hexa_h = "0123456789abcdef"; ! var hexa_c=""; ! var hexa_m=n; ! for (hexa_i=0;hexa_i<8;hexa_i++) { ! hexa_c=hexa_h.charAt(Math.abs(hexa_m)%16)+hexa_c; ! hexa_m=Math.floor(hexa_m/16); ! } ! return hexa_c; ! } ! ! ! var ascii="01234567890123456789012345678901" + ! " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ"+ ! "[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"; ! ! function MD5(entree) ! { ! var l,s,k,ka,kb,kc,kd; ! ! init(); ! for (k=0;k<entree.length;k++) { ! l=entree.charAt(k); ! update(ascii.lastIndexOf(l)); ! } ! finish(); ! ka=kb=kc=kd=0; ! for (i=0;i<4;i++) ka+=shl(digestBits[15-i], (i*8)); ! for (i=4;i<8;i++) kb+=shl(digestBits[15-i], ((i-4)*8)); ! for (i=8;i<12;i++) kc+=shl(digestBits[15-i], ((i-8)*8)); ! for (i=12;i<16;i++) kd+=shl(digestBits[15-i], ((i-12)*8)); ! s=hexa(kd)+hexa(kc)+hexa(kb)+hexa(ka); ! return s; ! } --- 1,256 ---- ! /* ! * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message ! * Digest Algorithm, as defined in RFC 1321. ! * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. ! * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet ! * Distributed under the BSD License ! * See http://pajhome.org.uk/crypt/md5 for more info. ! */ ! ! /* ! * Configurable variables. You may need to tweak these to be compatible with ! * the server-side, but the defaults work in most cases. ! */ ! var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ ! var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ ! var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ ! ! /* ! * These are the functions you'll usually want to call ! * They take string arguments and return either hex or base-64 encoded strings ! */ ! function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));} ! function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));} ! function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));} ! function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); } ! function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); } ! function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); } ! ! /* ! * Perform a simple self-test to see if the VM is working ! */ ! function md5_vm_test() ! { ! return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; ! } ! ! /* ! * Calculate the MD5 of an array of little-endian words, and a bit length ! */ ! function core_md5(x, len) ! { ! /* append padding */ ! x[len >> 5] |= 0x80 << ((len) % 32); ! x[(((len + 64) >>> 9) << 4) + 14] = len; ! ! var a = 1732584193; ! var b = -271733879; ! var c = -1732584194; ! var d = 271733878; ! ! for(var i = 0; i < x.length; i += 16) ! { ! var olda = a; ! var oldb = b; ! var oldc = c; ! var oldd = d; ! ! a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); ! d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); ! c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); ! b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); ! a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); ! d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); ! c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); ! b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); ! a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); ! d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); ! c = md5_ff(c, d, a, b, x[i+10], 17, -42063); ! b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); ! a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); ! d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); ! c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); ! b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); ! ! a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); ! d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); ! c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); ! b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); ! a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); ! d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); ! c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); ! b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); ! a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); ! d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); ! c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); ! b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); ! a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); ! d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); ! c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); ! b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); ! ! a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); ! d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); ! c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); ! b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); ! a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); ! d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); ! c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); ! b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); ! a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); ! d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); ! c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); ! b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); ! a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); ! d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); ! c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); ! b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); ! ! a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); ! d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); ! c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); ! b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); ! a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); ! d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); ! c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); ! b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); ! a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); ! d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); ! c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); ! b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); ! a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); ! d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); ! c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); ! b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); ! ! a = safe_add(a, olda); ! b = safe_add(b, oldb); ! c = safe_add(c, oldc); ! d = safe_add(d, oldd); ! } ! return Array(a, b, c, d); ! ! } ! ! /* ! * These functions implement the four basic operations the algorithm uses. ! */ ! function md5_cmn(q, a, b, x, s, t) ! { ! return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); ! } ! function md5_ff(a, b, c, d, x, s, t) ! { ! return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); ! } ! function md5_gg(a, b, c, d, x, s, t) ! { ! return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); ! } ! function md5_hh(a, b, c, d, x, s, t) ! { ! return md5_cmn(b ^ c ^ d, a, b, x, s, t); ! } ! function md5_ii(a, b, c, d, x, s, t) ! { ! return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); ! } ! ! /* ! * Calculate the HMAC-MD5, of a key and some data ! */ ! function core_hmac_md5(key, data) ! { ! var bkey = str2binl(key); ! if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz); ! ! var ipad = Array(16), opad = Array(16); ! for(var i = 0; i < 16; i++) ! { ! ipad[i] = bkey[i] ^ 0x36363636; ! opad[i] = bkey[i] ^ 0x5C5C5C5C; ! } ! ! var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz); ! return core_md5(opad.concat(hash), 512 + 128); ! } ! ! /* ! * Add integers, wrapping at 2^32. This uses 16-bit operations internally ! * to work around bugs in some JS interpreters. ! */ ! function safe_add(x, y) ! { ! var lsw = (x & 0xFFFF) + (y & 0xFFFF); ! var msw = (x >> 16) + (y >> 16) + (lsw >> 16); ! return (msw << 16) | (lsw & 0xFFFF); ! } ! ! /* ! * Bitwise rotate a 32-bit number to the left. ! */ ! function bit_rol(num, cnt) ! { ! return (num << cnt) | (num >>> (32 - cnt)); ! } ! ! /* ! * Convert a string to an array of little-endian words ! * If chrsz is ASCII, characters >255 have their hi-byte silently ignored. ! */ ! function str2binl(str) ! { ! var bin = Array(); ! var mask = (1 << chrsz) - 1; ! for(var i = 0; i < str.length * chrsz; i += chrsz) ! bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32); ! return bin; ! } ! ! /* ! * Convert an array of little-endian words to a string ! */ ! function binl2str(bin) ! { ! var str = ""; ! var mask = (1 << chrsz) - 1; ! for(var i = 0; i < bin.length * 32; i += chrsz) ! str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask); ! return str; ! } ! ! /* ! * Convert an array of little-endian words to a hex string. ! */ ! function binl2hex(binarray) ! { ! var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; ! var str = ""; ! for(var i = 0; i < binarray.length * 4; i++) ! { ! str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + ! hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF); ! } ! return str; ! } ! ! /* ! * Convert an array of little-endian words to a base-64 string ! */ ! function binl2b64(binarray) ! { ! var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; ! var str = ""; ! for(var i = 0; i < binarray.length * 4; i += 3) ! { ! var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16) ! | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 ) ! | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF); ! for(var j = 0; j < 4; j++) ! { ! if(i * 8 + j * 6 > binarray.length * 32) str += b64pad; ! else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); ! } ! } ! return str; ! } |
From: Joe S. <joe...@us...> - 2003-03-27 18:33:26
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv31369/phpslash-ft Modified Files: CHANGES Log Message: bug [ 710158 ] md5.js broken with passwords using special chars Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.738 retrieving revision 1.739 diff -C2 -d -r1.738 -r1.739 *** CHANGES 27 Mar 2003 17:09:33 -0000 1.738 --- CHANGES 27 Mar 2003 18:33:19 -0000 1.739 *************** *** 14,17 **** --- 14,23 ---- 2003-March-27 11:00AM CST Joe Stewart <joe...@us...> + [B] - md5.js, basic/loginformCR.tpl - bug [ 710158 ] md5.js broken with + passwords using special chars - Corrected by using a different md5.js. + The setcookie form field was missing in logintrue form for the basic + template set. + + 2003-March-27 11:00AM CST Joe Stewart <joe...@us...> [B] - login.php3, slashAuthCR.class - corrected unregistering comment session variables with register_globals off. |
From: Joe S. <joe...@us...> - 2003-03-27 17:10:28
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv25481/phpslash-ft Modified Files: CHANGES Log Message: corrected unregistering comment session variables with register_globals off. Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.737 retrieving revision 1.738 diff -C2 -d -r1.737 -r1.738 *** CHANGES 27 Mar 2003 15:42:21 -0000 1.737 --- CHANGES 27 Mar 2003 17:09:33 -0000 1.738 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2003-March-27 11:00AM CST Joe Stewart <joe...@us...> + [B] - login.php3, slashAuthCR.class - corrected unregistering comment session + variables with register_globals off. + 2003-March-27 9:30AM CST Joe Stewart <joe...@us...> [F] - Story_admin.class, Block.class - limit story deletion to allowed |
From: Joe S. <joe...@us...> - 2003-03-27 17:09:47
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv25481/phpslash-ft/class Modified Files: slashAuthCR.class Log Message: corrected unregistering comment session variables with register_globals off. Index: slashAuthCR.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/slashAuthCR.class,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** slashAuthCR.class 26 Mar 2003 14:40:36 -0000 1.46 --- slashAuthCR.class 27 Mar 2003 17:09:42 -0000 1.47 *************** *** 387,396 **** --- 387,402 ---- if($this->sess->is_registered("comment_name")) { $this->sess->unregister("comment_name"); + $_SESSION['comment_name'] = null; + unset($GLOBALS['comment_name']); } if($this->sess->is_registered("comment_email")) { $this->sess->unregister("comment_email"); + $_SESSION['comment_email'] = null; + unset($GLOBALS['comment_email']); } if($this->sess->is_registered("comment_url")) { $this->sess->unregister("comment_url"); + $_SESSION['comment_url'] = null; + unset($GLOBALS['comment_url']); } |
From: Joe S. <joe...@us...> - 2003-03-27 17:09:46
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv25481/phpslash-ft/public_html Modified Files: login.php3 Log Message: corrected unregistering comment session variables with register_globals off. Index: login.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/login.php3,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** login.php3 26 Mar 2003 14:40:34 -0000 1.41 --- login.php3 27 Mar 2003 17:09:41 -0000 1.42 *************** *** 59,68 **** --- 59,74 ---- if($sess->is_registered("comment_name")) { $sess->unregister("comment_name"); + $_SESSION['comment_name'] = null; + unset($comment_name); } if($sess->is_registered("comment_email")) { $sess->unregister("comment_email"); + $_SESSION['comment_email'] = null; + unset($comment_email); } if($sess->is_registered("comment_url")) { $sess->unregister("comment_url"); + $_SESSION['comment_url'] = null; + unset($comment_url); } $HTTP_GET_VARS['logout'] = ''; |
From: Joe S. <joe...@us...> - 2003-03-27 15:42:27
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv14091/phpslash-ft/class Modified Files: Story_admin.class Block.class Log Message: This should address RFE [ 513264 ] Controlled access to sections. Index: Story_admin.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Story_admin.class,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Story_admin.class 27 Mar 2003 15:03:23 -0000 1.15 --- Story_admin.class 27 Mar 2003 15:42:23 -0000 1.16 *************** *** 79,85 **** // gotta get the story user_id ! $story_ary = $this->extractStory($story_id, "Full"); $user_id = $story_ary['user_id']; ! if((!$this->perm->have_perm('storydeleteothers')) AND ( $user_id != $this->auth->auth['uid'])) { --- 79,85 ---- // gotta get the story user_id ! $story_ary = $this->extractStory($story_id, "Full"); $user_id = $story_ary['user_id']; ! if((!$this->perm->have_perm('storydeleteothers')) AND ( $user_id != $this->auth->auth['uid'])) { *************** *** 88,128 **** $this->message = pslgetText("The storyid is: ").$story_id."<BR>\n"; - if ($_PSL['module']['Comment']) { - $comment = pslNew("Comment"); - $deleted_comments = $comment->delete("0",$story_id); - $this->message .= sprintf(pslgetText("You deleted %s comments"), $deleted_comments)."<BR>\n"; - } ! $section_del = "DELETE ! FROM psl_section_lut ! WHERE story_id = '$story_id'"; ! $topic_del = "DELETE ! FROM psl_topic_lut ! WHERE story_id = '$story_id'"; ! $story_del = "DELETE ! FROM psl_story ! WHERE story_id = '$story_id'"; ! if ($this->db->query($section_del)) { ! $section_count = $this->db->affected_rows(); ! $this->message .= sprintf(pslgetText("removed %s section pointer(s)"), $section_count)."<BR>\n"; ! } ! if ($this->db->query($topic_del)) { ! $topic_count = $this->db->affected_rows(); ! $this->message .= sprintf(pslgetText("removed %s topic pointer(s)"), $topic_count)."<BR>\n"; ! } ! if ($this->db->query($story_del)) { ! $story_count = $this->db->affected_rows(); ! $this->message .= pslgetText("removed the story")."<BR>\n"; ! } return true; } /* function to allow a story Preview */ ! function showStory($ary) { ! $story = pslNew("Story"); --- 88,185 ---- $this->message = pslgetText("The storyid is: ").$story_id."<BR>\n"; ! if ($this->perm->have_perm("storyDelete && ". ALLSECTIONS)) { ! // all permisssions - so go ahead and delete story ! if ($_PSL['module']['Comment']) { ! $comment = pslNew("Comment"); ! $deleted_comments = $comment->delete("0",$story_id); ! $this->message .= sprintf(pslgetText("You deleted %s comments"), $deleted_comments)."<BR>\n"; ! } ! $section_del = "DELETE ! FROM psl_section_lut ! WHERE story_id = '$story_id'"; ! $topic_del = "DELETE ! FROM psl_topic_lut ! WHERE story_id = '$story_id'"; ! ! $story_del = "DELETE ! FROM psl_story ! WHERE story_id = '$story_id'"; ! if ($this->db->query($section_del)) { ! $section_count = $this->db->affected_rows(); ! $this->message .= sprintf(pslgetText("removed %s section pointer(s)"), $section_count)."<BR>\n"; ! } ! if ($this->db->query($topic_del)) { ! $topic_count = $this->db->affected_rows(); ! $this->message .= sprintf(pslgetText("removed %s topic pointer(s)"), $topic_count)."<BR>\n"; ! } ! if ($this->db->query($story_del)) { ! $story_count = $this->db->affected_rows(); ! $this->message .= pslgetText("removed the story")."<BR>\n"; ! } ! } else { ! // permissions only to certain sections - so delete only that portion ! $section_count = 0; ! ! // get current sections assigned to block ! $section_q = "SELECT section_id ! FROM psl_section_lut ! WHERE story_id = '$story_id' "; ! // debug("section_q", $section_q); ! $this->db->query($section_q); ! $ok = true; // start with allowing story to be deleted ! while($this->db->next_record()) { ! if ($this->perm->have_perm("storyDelete && section_id".$this->db->Record['section_id'])){ ! $section_id =$this->db->Record['section_id']; ! // debug("section_id", $section_id); ! // only delete for the section that the user has permission ! $db2 = pslNew("slashDB"); //create another db object ! $section_lut_del = "DELETE FROM psl_section_lut ! WHERE story_id = '$story_id' ! AND section_id = '$section_id' "; ! // debug("section_lut_del", $section_lut_del); ! if ($db2->query($section_lut_del)) { ! $section_count++; ! } ! } else { ! // don't have permission to this section - so don't allow block to be deleted ! $ok = false; ! } ! } //endwhile ! $this->message .= sprintf(pslgetText("removed %s section pointer(s)"), $section_count)."<BR>\n"; ! ! // if allowed - delete story and associated records ! if($ok) { ! $topic_del = "DELETE ! FROM psl_topic_lut ! WHERE story_id = '$story_id'"; ! ! $story_del = "DELETE ! FROM psl_story ! WHERE story_id = '$story_id'"; ! ! if ($this->db->query($topic_del)) { ! $topic_count = $this->db->affected_rows(); ! $this->message .= sprintf(pslgetText("removed %s topic pointer(s)"), $topic_count)."<BR>\n"; ! } ! if ($this->db->query($story_del)) { ! $story_count = $this->db->affected_rows(); ! $this->message .= pslgetText("removed the story")."<BR>\n"; ! } ! } ! ! ! ! } //endif return true; } /* function to allow a story Preview */ ! function showStory($ary) { ! $story = pslNew("Story"); Index: Block.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block.class,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Block.class 27 Mar 2003 15:03:21 -0000 1.26 --- Block.class 27 Mar 2003 15:42:23 -0000 1.27 *************** *** 560,564 **** } ! if ($this->perm->have_perm("blockEdit && ". ALLSECTIONS)) { // debug("ALLSECTIONS-perms", $this->auth->auth['perm']); // all permisssions - so go ahead and delete block --- 560,564 ---- } ! if ($this->perm->have_perm("blockDelete && ". ALLSECTIONS)) { // debug("ALLSECTIONS-perms", $this->auth->auth['perm']); // all permisssions - so go ahead and delete block *************** *** 583,587 **** $ok = true; // start with allowing block to be deleted while($this->db->next_record()) { ! if ($this->perm->have_perm("blockEdit && section_id".$this->db->Record['section_id'])){ $section_id =$this->db->Record['section_id']; // debug("section_id", $section_id); --- 583,587 ---- $ok = true; // start with allowing block to be deleted while($this->db->next_record()) { ! if ($this->perm->have_perm("blockDelete && section_id".$this->db->Record['section_id'])){ $section_id =$this->db->Record['section_id']; // debug("section_id", $section_id); |
From: Joe S. <joe...@us...> - 2003-03-27 15:42:26
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv14091/phpslash-ft Modified Files: CHANGES Log Message: This should address RFE [ 513264 ] Controlled access to sections. Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.736 retrieving revision 1.737 diff -C2 -d -r1.736 -r1.737 *** CHANGES 27 Mar 2003 15:03:19 -0000 1.736 --- CHANGES 27 Mar 2003 15:42:21 -0000 1.737 *************** *** 13,16 **** --- 13,21 ---- 9 - Removal of something (kill -9 :) + 2003-March-27 9:30AM CST Joe Stewart <joe...@us...> + [F] - Story_admin.class, Block.class - limit story deletion to allowed + sections. This should address RFE [ 513264 ] Controlled access to + sections. + 2003-March-27 9:00AM CST Joe Stewart <joe...@us...> [F] - Block.class, Block_admin.class, blockAdmin.php3 - limit block admin. |
From: Joe S. <joe...@us...> - 2003-03-27 15:03:56
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv25546/phpslash-ft Modified Files: CHANGES Log Message: limit block admin. to allowed sections. Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.735 retrieving revision 1.736 diff -C2 -d -r1.735 -r1.736 *** CHANGES 26 Mar 2003 20:27:36 -0000 1.735 --- CHANGES 27 Mar 2003 15:03:19 -0000 1.736 *************** *** 13,16 **** --- 13,21 ---- 9 - Removal of something (kill -9 :) + 2003-March-27 9:00AM CST Joe Stewart <joe...@us...> + [F] - Block.class, Block_admin.class, blockAdmin.php3 - limit block admin. + to allowed sections. + Story_admin.class - break out of while if any section is available. + 2003-March-26 2:00PM CST Joe Stewart <joe...@us...> [W] - Story_admin.class - list only stories in sections that the user has |
From: Joe S. <joe...@us...> - 2003-03-27 15:03:29
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv25546/phpslash-ft/class Modified Files: Block.class Block_admin.class Story_admin.class Log Message: limit block admin. to allowed sections. Index: Block.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block.class,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Block.class 5 Feb 2003 21:58:41 -0000 1.25 --- Block.class 27 Mar 2003 15:03:21 -0000 1.26 *************** *** 43,47 **** $this->parsedData = ""; } ! /** * reset - Resets object to empty values --- 43,47 ---- $this->parsedData = ""; } ! /** * reset - Resets object to empty values *************** *** 209,215 **** */ function putBlock($block_array) { ! if(is_array($block_array)) { ! $optionname_ary = $block_array['optionname']; $optionval_ary = $block_array['optionval']; --- 209,215 ---- */ function putBlock($block_array) { ! if(is_array($block_array)) { ! $optionname_ary = $block_array['optionname']; $optionval_ary = $block_array['optionval']; *************** *** 223,227 **** } ! $section_id_ary = $block_array['section_id_ary']; $serial_opts=addslashes(serialize($block_options_ary)); --- 223,235 ---- } ! // move the section id's from the array value to the array key ! if(is_array($block_array['section_id_ary'])) { ! foreach($block_array['section_id_ary'] as $value) { ! $section_id_ary[$value] = true; ! } ! } else { ! $section_id_ary = array(); ! } ! $serial_opts=addslashes(serialize($block_options_ary)); *************** *** 235,269 **** $this->message = sprintf(pslgetText("Updating Block %s. "), $block_array["block_id"]); - - $section_del = "DELETE FROM psl_section_block_lut - WHERE block_id='$block_array[block_id]'"; ! // echo "<H3>SECTION_DEL: $section_del</H3>\n"; ! $this->db->query($section_del); ! $timestamp = time(); ! $query = "UPDATE psl_block ! SET id = '$block_array[block_id]', ! type = '$block_array[block_type]', ! expire_length = '$block_array[expire_length]', ! date_issued = NULL, ! title = '$block_array[block_title]', ! location = '$block_array[location]', ! source_url = '$block_array[source_url]', ! cache_data = '$block_array[cache_data]', ! ordernum = '$block_array[ordernum]', ! block_options = '$serial_opts' ! WHERE id = '$block_array[block_id]'"; ! // debug("Block.class::putBlock::query", $query); $this->db->query($query); ! } else { $this->message = pslgetText("Creating new block from submitted info."); ! $timestamp = time(); $block_array["block_id"] = generateID("psl_block_seq"); ! $query = "INSERT INTO psl_block (id, type, --- 243,280 ---- $this->message = sprintf(pslgetText("Updating Block %s. "), $block_array["block_id"]); ! $timestamp = time(); ! $query = "UPDATE psl_block ! SET id = '$block_array[block_id]', ! type = '$block_array[block_type]', ! expire_length = '$block_array[expire_length]', ! date_issued = NULL, ! title = '$block_array[block_title]', ! location = '$block_array[location]', ! source_url = '$block_array[source_url]', ! cache_data = '$block_array[cache_data]', ! ordernum = '$block_array[ordernum]', ! block_options = '$serial_opts' ! WHERE id = '$block_array[block_id]'"; ! // debug("Block.class::putBlock::query", $query); $this->db->query($query); ! // get current sections assigned to block ! $section_q = "SELECT section_id ! FROM psl_section_block_lut ! WHERE block_id = '$block_array[block_id]' "; ! $this->db->query($section_q); ! while($this->db->next_record()) { ! $sections_current[$this->db->Record['section_id']] = true; ! } ! } else { $this->message = pslgetText("Creating new block from submitted info."); ! $timestamp = time(); $block_array["block_id"] = generateID("psl_block_seq"); ! $query = "INSERT INTO psl_block (id, type, *************** *** 276,309 **** block_options) VALUES ('$block_array[block_id]', ! '$block_array[block_type]', ! '$block_array[expire_length]', ! '$block_array[block_title]', ! '$block_array[location]', ! '$block_array[source_url]', '$block_array[cache_data]', '$block_array[ordernum]', '$serial_opts') ! "; $this->message .= pslgetText("Adding the block to the db..."); $this->db->query($query); } ! ! if(is_array($section_id_ary) ) { ! while ( list( $key, $val ) = each( $section_id_ary ) ) { $lut_id = generateID("psl_section_block_lut_seq"); $lut_insert = "INSERT INTO psl_section_block_lut ! (lut_id, ! section_id, ! block_id) ! VALUES ('$lut_id', ! '$val', ! '$block_array[block_id]')"; ! # echo "<H3>LUT_INSERT: $lut_insert</H3>\n"; $this->db->query($lut_insert); ! } ! } else { $this->message .= sprintf(pslgetText("No section chosen. Block will not be displayed on site till a section is chosen for block: %s"), $block_array[block_title]); ! } $this->message .= pslgetText("Checking db..."); --- 287,348 ---- block_options) VALUES ('$block_array[block_id]', ! '$block_array[block_type]', ! '$block_array[expire_length]', ! '$block_array[block_title]', ! '$block_array[location]', ! '$block_array[source_url]', '$block_array[cache_data]', '$block_array[ordernum]', '$serial_opts') ! "; $this->message .= pslgetText("Adding the block to the db..."); $this->db->query($query); + $sections_current = array(); } ! ! // get available sections for this user ( not necessarily the story author) ! $sections_available = array(); ! $section_q = "SELECT section_id ! FROM psl_section "; ! $this->db->query($section_q); ! while ($this->db->next_record() ) { ! if ( ($this->perm->have_perm("blockPut && ". ALLSECTIONS) ) || ! ($this->perm->have_perm("blockPut && section_id".$this->db->Record['section_id']) ) ) { ! $sections_available[$this->db->Record['section_id']] = true; ! } ! } ! ! foreach( $sections_available as $key => $value) { ! // is section choice already assigned to this story? ! if( !empty($section_id_ary[$key]) && ! !empty($sections_current[$key]) ) { ! // do nothing (skip) ! } elseif (!empty($section_id_ary[$key]) ) { ! // section is chosen - so insert $lut_id = generateID("psl_section_block_lut_seq"); $lut_insert = "INSERT INTO psl_section_block_lut ! (lut_id, ! section_id, ! block_id) ! VALUES ('$lut_id', ! '$key', ! '$block_array[block_id]')"; $this->db->query($lut_insert); ! } elseif (!empty($sections_current[$key]) ) { ! // section available but not chosen - so delete ! $lut_delete = "DELETE FROM psl_section_block_lut ! WHERE block_id = '$block_array[block_id]' ! AND section_id = '$key' "; ! $this->db->query($lut_delete); ! } ! ! } ! ! // if the block isn't assigned to any sections ! if( (count($section_id_ary) <1) && ! (count($sections_current) < 1) ){ $this->message .= sprintf(pslgetText("No section chosen. Block will not be displayed on site till a section is chosen for block: %s"), $block_array[block_title]); ! } $this->message .= pslgetText("Checking db..."); *************** *** 316,324 **** } else { $this->message .= pslgetText("Error adding block. Query returned multiple results."); ! return false; } } else { $this->message = pslgetText("Block::putBlock() received data not in an array."); ! return false; } return $this->message; --- 355,363 ---- } else { $this->message .= pslgetText("Error adding block. Query returned multiple results."); ! return false; } } else { $this->message = pslgetText("Block::putBlock() received data not in an array."); ! return false; } return $this->message; *************** *** 326,333 **** /** ! * checkTime - Check the refresh time and return true ! * if the stored data is ok * ! * @access private * */ --- 365,372 ---- /** ! * checkTime - Check the refresh time and return true ! * if the stored data is ok * ! * @access private * */ *************** *** 508,515 **** /** * delBlock - delete a Block ! * * @param integer id * ! * @access private * * return boolean success --- 547,554 ---- /** * delBlock - delete a Block ! * * @param integer id * ! * @access private * * return boolean success *************** *** 519,544 **** if (!$id) { return false; ! }; ! $block_del = "DELETE FROM psl_block WHERE id = '$id'"; ! $section_lut_del = "DELETE FROM psl_section_block_lut WHERE block_id = '$id'"; ! // echo "DELBLOCK: $block_del<BR><BR>SECTION: $section_lut_del<BR><BR>\n"; ! if (!$this->db->query($block_del)) { ! return false; ! } ! if (!$this->db->query($section_lut_del)) { ! return false; ! } ! logwrite("Block Admin", "Deleted block $id"); return true; } ! /** * returns an array of blocks * * @param array ary ! * * ary currently accepts: * --- 558,624 ---- if (!$id) { return false; ! } ! if ($this->perm->have_perm("blockEdit && ". ALLSECTIONS)) { ! // debug("ALLSECTIONS-perms", $this->auth->auth['perm']); ! // all permisssions - so go ahead and delete block ! $section_lut_del = "DELETE FROM psl_section_block_lut WHERE block_id = '$id'"; ! if (!$this->db->query($section_lut_del)) { ! return false; ! } ! $block_del = "DELETE FROM psl_block WHERE id = '$id'"; ! if (!$this->db->query($block_del)) { ! return false; ! } ! logwrite("Block Admin", "Deleted block $id"); ! } else { ! // permissions only to certain sections - so delete only that portion ! // get current sections assigned to block ! $section_q = "SELECT section_id ! FROM psl_section_block_lut ! WHERE block_id = '$id' "; ! // debug("section_q", $section_q); ! $this->db->query($section_q); ! $ok = true; // start with allowing block to be deleted ! while($this->db->next_record()) { ! if ($this->perm->have_perm("blockEdit && section_id".$this->db->Record['section_id'])){ ! $section_id =$this->db->Record['section_id']; ! // debug("section_id", $section_id); ! // only delete for the section that the user has permission ! $db2 = pslNew("slashDB"); //create another db object ! $section_lut_del = "DELETE FROM psl_section_block_lut ! WHERE block_id = '$id' ! AND section_id = '$section_id' "; ! // debug("section_lut_del", $section_lut_del); ! if (!$db2->query($section_lut_del)) { ! // debug("query", "failed"); ! return false; ! } ! } else { ! // don't have permission to this section - so don't allow block to be deleted ! $ok = false; ! } ! } //endwhile ! // if allowed - delete block ! if($ok) { ! $block_del = "DELETE FROM psl_block WHERE id = '$id'"; ! if (!$this->db->query($block_del)) { ! return false; ! } ! logwrite("Block Admin", "Deleted block $id"); ! } ! } // endif ! ! // success return true; } ! /** * returns an array of blocks * * @param array ary ! * * ary currently accepts: * Index: Block_admin.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_admin.class,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Block_admin.class 12 Feb 2003 22:33:43 -0000 1.9 --- Block_admin.class 27 Mar 2003 15:03:23 -0000 1.10 *************** *** 14,18 **** */ class Block_admin extends Block_i { ! /* class Block_i also defines the following properties * psl, $templ, $debug, $argv_ary */ --- 14,18 ---- */ class Block_admin extends Block_i { ! /* class Block_i also defines the following properties * psl, $templ, $debug, $argv_ary */ *************** *** 71,80 **** ORDER BY section_name"); while ($this->db->next_record()) { ! $this->templ->set_var(array( ! 'SECTION_ID' => $this->db->Record['section_id'], ! 'SELECTED' => "", ! 'SECTION_NAME' => $this->db->Record['section_name'] ! )); ! $this->templ->parse("section_rows","section_row",true); } --- 71,83 ---- ORDER BY section_name"); while ($this->db->next_record()) { ! if (($this->perm->have_perm("blockNew && ". ALLSECTIONS)) || ! ($this->perm->have_perm("blockNew && section_id".$this->db->Record['section_id']))) { ! $this->templ->set_var(array( ! 'SECTION_ID' => $this->db->Record['section_id'], ! 'SELECTED' => "", ! 'SECTION_NAME' => $this->db->Record['section_name'] ! )); ! $this->templ->parse("section_rows","section_row",true); ! } } *************** *** 149,165 **** ORDER BY section_name"); while ($this->db->next_record()) { ! $this->templ->set_var(array( ! 'SECTION_ID' => $this->db->Record['section_id'], ! 'SECTION_NAME' => $this->db->Record['section_name'] ! )); ! $this->templ->set_var('SELECTED',""); ! for ($i = 0 ; $i < count($section_ary) ; $i++) { ! if ($section_ary[$i] == $this->db->Record['section_id']) { ! $this->templ->set_var('SELECTED',"SELECTED"); } } - - $this->templ->parse("section_rows","section_row",true); } $temparray=$this->block_info["block_options"]; --- 152,170 ---- ORDER BY section_name"); while ($this->db->next_record()) { ! if (($this->perm->have_perm("blockEdit && ". ALLSECTIONS)) || ! ($this->perm->have_perm("blockEdit && section_id".$this->db->Record['section_id']))) { ! $this->templ->set_var(array( ! 'SECTION_ID' => $this->db->Record['section_id'], ! 'SECTION_NAME' => $this->db->Record['section_name'] ! )); ! $this->templ->set_var('SELECTED',""); ! for ($i = 0 ; $i < count($section_ary) ; $i++) { ! if ($section_ary[$i] == $this->db->Record['section_id']) { ! $this->templ->set_var('SELECTED',"SELECTED"); ! } } + $this->templ->parse("section_rows","section_row",true); } } $temparray=$this->block_info["block_options"]; *************** *** 218,221 **** --- 223,248 ---- $block_id = $this->db->f("id"); + + // get block's sections + $db2 = pslNew("slashDB"); + $db2->query("SELECT section_id + FROM psl_section_block_lut + WHERE block_id = '$block_id' "); + if ($this->perm->have_perm("blockList && ". ALLSECTIONS)) { + $ok = true; + } else { + $ok = false; + } + while ($db2->next_record()) { + // permisssion to any of them? + if ($this->perm->have_perm("blockList && section_id".$db2->Record['section_id'])) { + $ok = true; + break; + } + } + if(!$ok) { + continue; + } + $modifyurl = $this->psl['adminurl'] ."/blockAdmin.php3?submit=edit&id=". $block_id; $delurl = $this->psl['adminurl'] ."/blockAdmin.php3?submit=delete&id=". $block_id; *************** *** 223,227 **** $this->templ->set_var(array( ! 'TITLEBAR' => getTitlebar("100%", pslgetText("Update the Current Blocks")), 'MODIFYURL' => $modifyurl, 'DELURL' => $delurl, --- 250,254 ---- $this->templ->set_var(array( ! 'TITLEBAR' => getTitlebar("100%", pslgetText("Update the Current Blocks")), 'MODIFYURL' => $modifyurl, 'DELURL' => $delurl, *************** *** 233,245 **** )); if ($i%2 == 0) { ! $this->templ->parse("rows","row","true"); ! } else { $this->templ->parse("rows","row2","true"); ! } ! $i++; } return $this->templ->parse('OUT', array("listblock")); - // $this->templ->p('OUT'); } --- 260,271 ---- )); if ($i%2 == 0) { ! $this->templ->parse("rows","row","true"); ! } else { $this->templ->parse("rows","row2","true"); ! } ! $i++; } return $this->templ->parse('OUT', array("listblock")); } Index: Story_admin.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Story_admin.class,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Story_admin.class 26 Mar 2003 20:27:38 -0000 1.14 --- Story_admin.class 27 Mar 2003 15:03:23 -0000 1.15 *************** *** 418,422 **** $ok = true; $count++; ! // break; } } --- 418,422 ---- $ok = true; $count++; ! break; } } |
From: Joe S. <joe...@us...> - 2003-03-27 15:03:28
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/admin In directory sc8-pr-cvs1:/tmp/cvs-serv25546/phpslash-ft/public_html/admin Modified Files: blockAdmin.php3 Log Message: limit block admin. to allowed sections. Index: blockAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/blockAdmin.php3,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** blockAdmin.php3 3 Feb 2003 18:02:57 -0000 1.16 --- blockAdmin.php3 27 Mar 2003 15:03:24 -0000 1.17 *************** *** 41,45 **** if ($perm->have_perm("blockDelete")) { if ($block->delBlock($HTTP_GET_VARS['id'])) { ! $content .= pslgetText("The Block has been Deleted"); } } --- 41,47 ---- if ($perm->have_perm("blockDelete")) { if ($block->delBlock($HTTP_GET_VARS['id'])) { ! $content .= getMessage($block->message); ! } else { ! $content .= getError($block->message); } } *************** *** 71,76 **** case "update": if ($perm->have_perm("blockPut")) { ! $content .= $block->putBlock($HTTP_POST_VARS); ! // expire cache for these section_id's $section_id_ary = $HTTP_POST_VARS['section_id_ary']; --- 73,81 ---- case "update": if ($perm->have_perm("blockPut")) { ! if($block->putBlock($HTTP_POST_VARS)) { ! $content .= getMessage($block->message); ! } else { ! $content .= getError($block->message); ! } // expire cache for these section_id's $section_id_ary = $HTTP_POST_VARS['section_id_ary']; *************** *** 95,99 **** $HTTP_GET_VARS['name'] = ''; } ! $content .= $block->listBlockTypes($HTTP_GET_VARS['option'], $HTTP_GET_VARS['name']); /* optional block type management */ } } --- 100,106 ---- $HTTP_GET_VARS['name'] = ''; } ! if ($perm->have_perm("block")) { ! $content .= $block->listBlockTypes($HTTP_GET_VARS['option'], $HTTP_GET_VARS['name']); /* optional block type management */ ! } } } |
From: Joe S. <joe...@us...> - 2003-03-26 20:27:44
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv897/phpslash-ft/class Modified Files: Story_admin.class Log Message: list only stories in sections that the user has permission Index: Story_admin.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Story_admin.class,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Story_admin.class 26 Mar 2003 18:16:09 -0000 1.13 --- Story_admin.class 26 Mar 2003 20:27:38 -0000 1.14 *************** *** 287,291 **** } $q .= " psl_commentcount commentcount ! WHERE story.story_id = commentcount.count_id AND author.author_id = story.user_id "; --- 287,291 ---- } $q .= " psl_commentcount commentcount ! WHERE story.story_id = commentcount.count_id AND author.author_id = story.user_id "; *************** *** 293,298 **** // if you're not a storyeditor, then you can only view your own stories. if (!$this->perm->have_perm("storylistothers")) { ! $q .= "AND '$user_id' = story.user_id ! AND '$user_id' = author.author_id "; } if ($author_id) { --- 293,298 ---- // if you're not a storyeditor, then you can only view your own stories. if (!$this->perm->have_perm("storylistothers")) { ! $q .= "AND '$user_id' = story.user_id ! AND '$user_id' = author.author_id "; } if ($author_id) { *************** *** 323,328 **** $topic_array = $topic->getTopics(); $section_array = $section->getSections(); ! ! $this->template->set_block("liststory", "each_author", "authors"); --- 323,328 ---- $topic_array = $topic->getTopics(); $section_array = $section->getSections(); ! ! $this->template->set_block("liststory", "each_author", "authors"); *************** *** 353,357 **** "SELECTED" => "" )); ! $this->template->parse("topics", "each_topic", "true"); while (list(, $cur_Topic) = each($topic_array)) { $this->template->set_var(array( --- 353,357 ---- "SELECTED" => "" )); ! $this->template->parse("topics", "each_topic", "true"); while (list(, $cur_Topic) = each($topic_array)) { $this->template->set_var(array( *************** *** 374,382 **** "SELECTED" => "" )); ! $this->template->parse("sections", "each_section", "true"); while (list(, $cur_Section) = each($section_array)) { $this->template->set_var(array( ! "SECTION_NAME" => $cur_Section[name], ! "SECTION_ID" => $cur_Section[id], "SELECTED" => "" )); --- 374,386 ---- "SELECTED" => "" )); ! $this->template->parse("sections", "each_section", "true"); while (list(, $cur_Section) = each($section_array)) { + if ((!$this->perm->have_perm("storyList && ". ALLSECTIONS)) && + (!$this->perm->have_perm("storyList && section_id".$cur_Section['id']))) { + continue; + } $this->template->set_var(array( ! "SECTION_NAME" => $cur_Section['name'], ! "SECTION_ID" => $cur_Section['id'], "SELECTED" => "" )); *************** *** 399,405 **** $story_id = $this->db->Record["story_id"]; ! $count++; ! if ( ($count > $first) and ($count <= ($first+$cmt_list)) ) { $view_url = $this->psl['rooturl'] . "/article.php3?story_id=$story_id"; --- 403,426 ---- $story_id = $this->db->Record["story_id"]; ! // $count++; ! // get story's sections ! $db2 = pslNew("slashDB"); ! $db2->query("SELECT section_id ! FROM psl_section_lut ! WHERE story_id = '$story_id' "); ! ! $ok = false; ! while ($db2->next_record()) { ! // permisssion to any of them? ! if (($this->perm->have_perm("storyList && ". ALLSECTIONS)) || ! ($this->perm->have_perm("storyList && section_id".$db2->Record['section_id']))) { ! $ok = true; ! $count++; ! // break; ! } ! } ! ! if ( ($count > $first) and ($count <= ($first+$cmt_list) and $ok) ) { $view_url = $this->psl['rooturl'] . "/article.php3?story_id=$story_id"; *************** *** 420,429 **** if ($i%2 == 0) { ! $this->template->parse("rows","row","true"); ! } else { $this->template->parse("rows","row2","true"); ! } ! $i++; ! } } --- 441,450 ---- if ($i%2 == 0) { ! $this->template->parse("rows","row","true"); ! } else { $this->template->parse("rows","row2","true"); ! } ! $i++; ! } } |
From: Joe S. <joe...@us...> - 2003-03-26 20:27:43
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv897/phpslash-ft Modified Files: CHANGES Log Message: list only stories in sections that the user has permission Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.734 retrieving revision 1.735 diff -C2 -d -r1.734 -r1.735 *** CHANGES 26 Mar 2003 18:14:35 -0000 1.734 --- CHANGES 26 Mar 2003 20:27:36 -0000 1.735 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2003-March-26 2:00PM CST Joe Stewart <joe...@us...> + [W] - Story_admin.class - list only stories in sections that the user has + permission. + 2003-March-26 12:00PM CST Joe Stewart <joe...@us...> [B] - Author.class, en.php3 - reject saving a new author if the username |
From: Joe S. <joe...@us...> - 2003-03-26 18:21:16
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv1288/phpslash-ft/class Modified Files: Story_base.class Log Message: correct placement of displayOption call. Index: Story_base.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Story_base.class,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Story_base.class 26 Mar 2003 18:15:52 -0000 1.24 --- Story_base.class 26 Mar 2003 18:21:08 -0000 1.25 *************** *** 641,648 **** // get available sections for this user ( not necessarily the story author) - // get current sections assigned to story $sections_available = array(); $section_q = "SELECT section_id ! FROM psl_section "; $this->db->query($section_q); while ($this->db->next_record() ) { --- 641,647 ---- // get available sections for this user ( not necessarily the story author) $sections_available = array(); $section_q = "SELECT section_id ! FROM psl_section "; $this->db->query($section_q); while ($this->db->next_record() ) { |
From: Joe S. <joe...@us...> - 2003-03-26 18:16:15
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv31104/phpslash-ft/class Modified Files: Story_admin.class Log Message: correct placement of displayOption call. Index: Story_admin.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Story_admin.class,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Story_admin.class 25 Mar 2003 21:27:14 -0000 1.12 --- Story_admin.class 26 Mar 2003 18:16:09 -0000 1.13 *************** *** 336,340 **** $this->template->set_var(array( "AUTHOR_ID" => $cur_Author['id'], ! "AUTHOR_NAME" => $cur_Author['name'], "SELECTED" => "" )); --- 336,340 ---- $this->template->set_var(array( "AUTHOR_ID" => $cur_Author['id'], ! "AUTHOR_NAME" => $cur_Author['name'], "SELECTED" => "" )); *************** *** 552,556 **** $this->template->parse("day_rows","day_row",true); } ! // setup hour select box for( $i=1; $i<=24; $i++) { --- 552,556 ---- $this->template->parse("day_rows","day_row",true); } ! // setup hour select box for( $i=1; $i<=24; $i++) { *************** *** 558,562 **** 'TYPE' => 'select', 'SELECTED' => '', ! 'STORYHOUR' => $i )); if( $i == $story_time[0]) { --- 558,562 ---- 'TYPE' => 'select', 'SELECTED' => '', ! 'STORYHOUR' => $i )); if( $i == $story_time[0]) { *************** *** 571,575 **** 'TYPE' => 'select', 'SELECTED' => '', ! 'STORYMINUTE' => sprintf( "%02d", $i) )); if( $i == $story_time[1]) { --- 571,575 ---- 'TYPE' => 'select', 'SELECTED' => '', ! 'STORYMINUTE' => sprintf( "%02d", $i) )); if( $i == $story_time[1]) { *************** *** 593,599 **** $this->template->parse("datetimeset_rows","datetimeset_row",true); } ! $this->template = displayOptions('story', $this->template, "newstory", ''); ! if ($ary['content'] == "plain") { $this->template->set_var('PLAIN_CHKBOX',"CHECKED"); --- 593,599 ---- $this->template->parse("datetimeset_rows","datetimeset_row",true); } ! $this->template = displayOptions('story', $this->template, "newstory", ''); ! if ($ary['content'] == "plain") { $this->template->set_var('PLAIN_CHKBOX',"CHECKED"); *************** *** 612,616 **** $topic_ary = $ary['topic_id_ary']; $section_ary = $ary['section_id_ary']; ! $user_id = $this->auth->auth['uid']; if ( $ary['author_id'] != "") { --- 612,616 ---- $topic_ary = $ary['topic_id_ary']; $section_ary = $ary['section_id_ary']; ! $user_id = $this->auth->auth['uid']; if ( $ary['author_id'] != "") { *************** *** 619,628 **** } elseif ($data_source == "database") { /* this is a story from the DB */ ! /* ! * Get the topic_id's for this story into an array */ ! $q = "SELECT psl_topic.topic_id ! FROM psl_topic,psl_topic_lut ! WHERE psl_topic_lut.story_id = '$story_id' AND psl_topic.topic_id = psl_topic_lut.topic_id"; $this->db->query($q); --- 619,628 ---- } elseif ($data_source == "database") { /* this is a story from the DB */ ! /* ! * Get the topic_id's for this story into an array */ ! $q = "SELECT psl_topic.topic_id ! FROM psl_topic,psl_topic_lut ! WHERE psl_topic_lut.story_id = '$story_id' AND psl_topic.topic_id = psl_topic_lut.topic_id"; $this->db->query($q); *************** *** 633,643 **** $i++; } ! ! /* ! * Get the section_id's for this story into an array */ ! $q = "SELECT psl_section.section_id ! FROM psl_section,psl_section_lut ! WHERE psl_section_lut.story_id = '$story_id' AND psl_section.section_id = psl_section_lut.section_id"; $this->db->query($q); --- 633,643 ---- $i++; } ! ! /* ! * Get the section_id's for this story into an array */ ! $q = "SELECT psl_section.section_id ! FROM psl_section,psl_section_lut ! WHERE psl_section_lut.story_id = '$story_id' AND psl_section.section_id = psl_section_lut.section_id"; $this->db->query($q); *************** *** 652,656 **** $this->db->query("SELECT * from psl_story WHERE story_id = '$story_id'"); $this->db->next_record(); ! /* dates are now implemented as UNIX timestamps. This line pretends that the old field (a MySQL datetime) still exists. --- 652,656 ---- $this->db->query("SELECT * from psl_story WHERE story_id = '$story_id'"); $this->db->next_record(); ! /* dates are now implemented as UNIX timestamps. This line pretends that the old field (a MySQL datetime) still exists. *************** *** 696,700 **** 'STORYYEAR' => $i )); ! if( $i == $story_date[0]) { $this->template->set_var('SELECTED', "selected=\"selected\""); --- 696,700 ---- 'STORYYEAR' => $i )); ! if( $i == $story_date[0]) { $this->template->set_var('SELECTED', "selected=\"selected\""); *************** *** 702,706 **** $this->template->parse("year_rows","year_row",true); } ! // setup month select box for( $i=1; $i<=12; $i++) { --- 702,706 ---- $this->template->parse("year_rows","year_row",true); } ! // setup month select box for( $i=1; $i<=12; $i++) { *************** *** 728,732 **** $this->template->parse("day_rows","day_row",true); } ! // setup hour select box for( $i=1; $i<=24; $i++) { --- 728,732 ---- $this->template->parse("day_rows","day_row",true); } ! // setup hour select box for( $i=1; $i<=24; $i++) { *************** *** 771,777 **** } ! $temparray = unserialize($this->db->Record['story_options']); ! $this->template->set_var(array( 'ACTION_URL' => "storyAdmin.php3", --- 771,777 ---- } ! $temparray = unserialize($this->db->Record['story_options']); ! $this->template->set_var(array( 'ACTION_URL' => "storyAdmin.php3", *************** *** 783,788 **** $this->db->query("SELECT topic_id, ! topic_name ! FROM psl_topic ORDER BY topic_name"); while ($this->db->next_record()) { --- 783,788 ---- $this->db->query("SELECT topic_id, ! topic_name ! FROM psl_topic ORDER BY topic_name"); while ($this->db->next_record()) { *************** *** 807,815 **** $this->db->query("SELECT section_id, ! section_name ! FROM psl_section ORDER BY section_name"); while ($this->db->next_record()) { ! if (($this->perm->have_perm("storyNew && ". ALLSECTIONS)) || ($this->perm->have_perm("storyNew && section_id".$this->db->Record['section_id']))) { $this->template->set_var(array( 'SECTION_ID' => $this->db->Record['section_id'], --- 807,815 ---- $this->db->query("SELECT section_id, ! section_name ! FROM psl_section ORDER BY section_name"); while ($this->db->next_record()) { ! if (($this->perm->have_perm("storyNew && ". ALLSECTIONS)) || ($this->perm->have_perm("storyNew && section_id".$this->db->Record['section_id']))) { $this->template->set_var(array( 'SECTION_ID' => $this->db->Record['section_id'], *************** *** 853,863 **** $this->template->set_var('AUTHOR_SELECTED',"SELECTED"); } - - $this->template->parse("author_rows","author_row",true); - } - - $this->template = displayOptions('story', $this->template, "newstory", $temparray); ! } $description = sprintf( "%s (%s) added new story %s as userid %s", $this->auth->auth['uname'], $this->auth->auth['uid'], $story_id, $user_id); logwrite("Story Admin", $description); --- 853,861 ---- $this->template->set_var('AUTHOR_SELECTED',"SELECTED"); } ! $this->template->parse("author_rows","author_row",true); ! } ! } ! $this->template = displayOptions('story', $this->template, "newstory", $temparray); $description = sprintf( "%s (%s) added new story %s as userid %s", $this->auth->auth['uname'], $this->auth->auth['uid'], $story_id, $user_id); logwrite("Story Admin", $description); *************** *** 871,876 **** * * simply returns the contents of the message variable ! * ! * @access public */ function getMessage() { --- 869,874 ---- * * simply returns the contents of the message variable ! * ! * @access public */ function getMessage() { |
From: Joe S. <joe...@us...> - 2003-03-26 18:15:57
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv30956/phpslash-ft/class Modified Files: Story_base.class Log Message: correct placement of displayOption call. Index: Story_base.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Story_base.class,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Story_base.class 25 Mar 2003 22:09:03 -0000 1.23 --- Story_base.class 26 Mar 2003 18:15:52 -0000 1.24 *************** *** 466,474 **** $topic_id_ary = $ary['topic_id_ary']; ! $section_id_ary = $ary['section_id_ary']; ! ! // echo "TID_ARY[0] = $topic_id_ary[0]<BR>\n"; ! // echo "SID_ARY[0] = $section_id_ary[0]<BR>\n"; ! /* removed because if there's no ID then we insert, else we update... if ($ary['story_id'] == "") { --- 466,479 ---- $topic_id_ary = $ary['topic_id_ary']; ! ! // move the section id's from the array value to the array key ! if(is_array($ary['section_id_ary'])) { ! foreach($ary['section_id_ary'] as $value) { ! $section_id_ary[$value] = true; ! } ! } else { ! $section_id_ary = array(); ! } ! /* removed because if there's no ID then we insert, else we update... if ($ary['story_id'] == "") { *************** *** 481,485 **** return false; } ! if ($section_id_ary[0] == "") { $this->message = "You need to select at least one section in Story.class::saveStory"; return false; --- 486,490 ---- return false; } ! if (count($section_id_ary) < 1) { $this->message = "You need to select at least one section in Story.class::saveStory"; return false; *************** *** 519,523 **** for( $i=0 ; $i < count($ary[optionname]) ; $i++) { ! if( $optionname_ary[$i] != "") { $optname = $optionname_ary[$i]; --- 524,528 ---- for( $i=0 ; $i < count($ary[optionname]) ; $i++) { ! if( $optionname_ary[$i] != "") { $optname = $optionname_ary[$i]; *************** *** 529,543 **** $serial_opts=addslashes(serialize($story_options_ary)); ! $this->db->query("SELECT story_id ! FROM psl_story WHERE story_id = '$ary[story_id]'"); if ($this->db->next_record()) { ! $q = "UPDATE psl_story ! SET user_id = '$ary[author_id]', title = '$ary[title]', date_available = $ary[timestamp], order_no = '$ary[order_no]', ! dept = '$ary[dept]', ! intro_text = '$ary[intro_text]', body_text = '$ary[body_text]', topic_cache = '', --- 534,548 ---- $serial_opts=addslashes(serialize($story_options_ary)); ! $this->db->query("SELECT story_id ! FROM psl_story WHERE story_id = '$ary[story_id]'"); if ($this->db->next_record()) { ! $q = "UPDATE psl_story ! SET user_id = '$ary[author_id]', title = '$ary[title]', date_available = $ary[timestamp], order_no = '$ary[order_no]', ! dept = '$ary[dept]', ! intro_text = '$ary[intro_text]', body_text = '$ary[body_text]', topic_cache = '', *************** *** 548,555 **** $this->db->query($q); ! $topic_del = "DELETE FROM psl_topic_lut ! WHERE story_id='$ary[story_id]'"; ! ! $section_del = "DELETE FROM psl_section_lut WHERE story_id='$ary[story_id]'"; --- 553,557 ---- $this->db->query($q); ! $topic_del = "DELETE FROM psl_topic_lut WHERE story_id='$ary[story_id]'"; *************** *** 557,563 **** $this->db->query($topic_del); - // echo "<H3>SECTION_DEL: $section_del</H3>\n"; - $this->db->query($section_del); } else { --- 559,571 ---- $this->db->query($topic_del); + // get current sections assigned to story + $section_q = "SELECT section_id + FROM psl_section_lut + WHERE story_id = '$ary[story_id]' "; + $this->db->query($section_q); + while($this->db->next_record()) { + $sections_current[$this->db->Record['section_id']] = true; + } } else { *************** *** 566,570 **** // echo "<B>STORY ID: $ary[story_id]</B><BR><BR>\n"; ! # set the formatting options for new submissions only if ($ary['content'] == "exttrans") { $ary['intro_text'] = htmlentities($ary['intro_text']); --- 574,578 ---- // echo "<B>STORY ID: $ary[story_id]</B><BR><BR>\n"; ! # set the formatting options for new submissions only if ($ary['content'] == "exttrans") { $ary['intro_text'] = htmlentities($ary['intro_text']); *************** *** 576,580 **** $ary['intro_text'] = ereg_replace("<br><br>","<br>",$ary['intro_text']); $ary['body_text'] = nl2br($ary[body_text]); ! $ary['body_text'] = ereg_replace("<br><br>","<br>",$ary['body_text']); } --- 584,588 ---- $ary['intro_text'] = ereg_replace("<br><br>","<br>",$ary['intro_text']); $ary['body_text'] = nl2br($ary[body_text]); ! $ary['body_text'] = ereg_replace("<br><br>","<br>",$ary['body_text']); } *************** *** 591,600 **** hits, topic_cache, ! story_options) VALUES ('$ary[story_id]', '$ary[author_id]', ! '$ary[title]', '$ary[order_no]', ! '$ary[dept]', '$ary[intro_text]', '$ary[body_text]', --- 599,608 ---- hits, topic_cache, ! story_options) VALUES ('$ary[story_id]', '$ary[author_id]', ! '$ary[title]', '$ary[order_no]', ! '$ary[dept]', '$ary[intro_text]', '$ary[body_text]', *************** *** 614,617 **** --- 622,628 ---- $this->db->query($cmtcount); + // no current sections for a new story + $sections_current = array(); + } *************** *** 629,643 **** } ! while ( list( $key, $val ) = each( $section_id_ary ) ) { ! $lut_id = generateID("psl_section_lut_seq"); ! $lut_insert = "INSERT INTO psl_section_lut ! (lut_id, ! section_id, ! story_id) ! VALUES ('$lut_id', ! '$val', ! '$ary[story_id]')"; ! // echo "<H3>LUT_INSERT: $lut_insert</H3>\n"; ! $this->db->query($lut_insert); } --- 640,680 ---- } ! // get available sections for this user ( not necessarily the story author) ! // get current sections assigned to story ! $sections_available = array(); ! $section_q = "SELECT section_id ! FROM psl_section "; ! $this->db->query($section_q); ! while ($this->db->next_record() ) { ! if ( ($this->perm->have_perm("storySave && ". ALLSECTIONS) ) || ! ($this->perm->have_perm("storySave && section_id".$this->db->Record['section_id']) ) ) { ! $sections_available[$this->db->Record['section_id']] = true; ! } ! } ! ! foreach( $sections_available as $key => $value) { ! // is section choice already assigned to this story? ! if( !empty($section_id_ary[$key]) && ! !empty($sections_current[$key]) ) { ! // do nothing (skip) ! } elseif (!empty($section_id_ary[$key]) ) { ! // section is chosen - so insert ! $lut_id = generateID("psl_section_lut_seq"); ! $lut_insert = "INSERT INTO psl_section_lut ! (lut_id, ! section_id, ! story_id) ! VALUES ('$lut_id', ! '$key', ! '$ary[story_id]')"; ! $this->db->query($lut_insert); ! } elseif (!empty($sections_current[$key]) ) { ! // section available but not chosen - so delete ! $lut_delete = "DELETE FROM psl_section_lut ! WHERE story_id = '$ary[story_id]' ! AND section_id = '$key' "; ! $this->db->query($lut_delete); ! } ! } *************** *** 649,653 **** // create topic object $topic = pslNew("Topic"); ! // use only the first topic in this array // most people choose one topic per story --- 686,690 ---- // create topic object $topic = pslNew("Topic"); ! // use only the first topic in this array // most people choose one topic per story *************** *** 661,665 **** function cacheStory( $ary, $field="", $story_id="") { ! // debug( "Story.class::cacheStory::ary", $ary); // debug( "Story.class::cacheStory::field", $field); --- 698,702 ---- function cacheStory( $ary, $field="", $story_id="") { ! // debug( "Story.class::cacheStory::ary", $ary); // debug( "Story.class::cacheStory::field", $field); *************** *** 705,709 **** } ! } // end of Story_base --- 742,746 ---- } ! } // end of Story_base |
From: Joe S. <joe...@us...> - 2003-03-26 18:15:18
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv30378/phpslash-ft/class Modified Files: Author.class Log Message: reject saving a new author if the username already exists. Index: Author.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Author.class,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** Author.class 25 Mar 2003 21:27:11 -0000 1.45 --- Author.class 26 Mar 2003 18:14:37 -0000 1.46 *************** *** 220,223 **** --- 220,232 ---- } else { + // if this name exists - bail out + $this->db->query("SELECT author_id, author_name + FROM psl_author + WHERE author_name = '".$ary['author_name']."'"); + if($this->db->next_record() ) { + $this->message .= "This username is already taken. Please choose a different one."; + return false; + } + if ($ary['password'] == "") { $this->message .= "There is no password in Author.class::saveAuthor"; |
From: Joe S. <joe...@us...> - 2003-03-26 18:15:15
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv30378/phpslash-ft Modified Files: CHANGES Log Message: reject saving a new author if the username already exists. Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.733 retrieving revision 1.734 diff -C2 -d -r1.733 -r1.734 *** CHANGES 26 Mar 2003 14:40:28 -0000 1.733 --- CHANGES 26 Mar 2003 18:14:35 -0000 1.734 *************** *** 13,19 **** 9 - Removal of something (kill -9 :) 2003-March-26 8:30AM CST Joe Stewart <joe...@us...> ! [W] - slashAuthCR.class, login.php3 - remove saved comment session variables when ! logging in and logging out. 2003-March-25 3:30PM CST Joe Stewart <joe...@us...> --- 13,27 ---- 9 - Removal of something (kill -9 :) + 2003-March-26 12:00PM CST Joe Stewart <joe...@us...> + [B] - Author.class, en.php3 - reject saving a new author if the username + already exists. + Story_admin.class - correct placement of displayOption call. + Story_base.class - saving a story no longer deletes all previous section + choices and then inserts new. It should only affect those sections for + which the user has permissions. + 2003-March-26 8:30AM CST Joe Stewart <joe...@us...> ! [W] - slashAuthCR.class, login.php3 - remove saved comment session variables ! when logging in and logging out. 2003-March-25 3:30PM CST Joe Stewart <joe...@us...> |
From: Joe S. <joe...@us...> - 2003-03-26 18:14:44
|
Update of /cvsroot/phpslash/phpslash-ft/class/locale In directory sc8-pr-cvs1:/tmp/cvs-serv30378/phpslash-ft/class/locale Modified Files: en.php3 Log Message: reject saving a new author if the username already exists. Index: en.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/locale/en.php3,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** en.php3 25 Mar 2003 22:09:05 -0000 1.18 --- en.php3 26 Mar 2003 18:14:39 -0000 1.19 *************** *** 311,315 **** "Email Confirmation failure", ! // Block.class "Block Type: %s added with an id of: %s" => --- 311,316 ---- "Email Confirmation failure", ! "This username is already taken. Please choose a different one." => ! "This username is already taken. Please choose a different one.", // Block.class "Block Type: %s added with an id of: %s" => |
From: Joe S. <joe...@us...> - 2003-03-26 14:41:13
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv18743/phpslash-ft/class Modified Files: slashAuthCR.class Log Message: remove saved comment session variables when logging in and logging out. Index: slashAuthCR.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/slashAuthCR.class,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** slashAuthCR.class 25 Mar 2003 21:27:16 -0000 1.45 --- slashAuthCR.class 26 Mar 2003 14:40:36 -0000 1.46 *************** *** 23,32 **** var $mode = "log"; var $psl; /** * customizes class names and loads the class definitions ! * ! * @param string classnames (as many as you want) * @return void */ --- 23,33 ---- var $mode = "log"; var $psl; + var $sess; /** * customizes class names and loads the class definitions ! * ! * @param string classnames (as many as you want) * @return void */ *************** *** 40,47 **** function start() { ! ! global $_PSL, $HTTP_GET_VARS; $this->psl = &$_PSL; if(!empty($_PSL['magic'])) { --- 41,49 ---- function start() { ! ! global $_PSL, $HTTP_GET_VARS, $sess; $this->psl = &$_PSL; + $this->sess = &$sess; if(!empty($_PSL['magic'])) { *************** *** 355,359 **** if(!empty($temparray['preferences'])){ $this->auth['preferences'] = $temparray['preferences']; ! // use language preference if(isset($this->auth['preferences']['lang'])) { --- 357,361 ---- if(!empty($temparray['preferences'])){ $this->auth['preferences'] = $temparray['preferences']; ! // use language preference if(isset($this->auth['preferences']['lang'])) { *************** *** 361,365 **** $this->psl['templatedir'] = setLangTpl($this->auth['preferences']['lang']); } ! // use skin preference // if(isset($this->auth['preferences']['skin'])) { --- 363,367 ---- $this->psl['templatedir'] = setLangTpl($this->auth['preferences']['lang']); } ! // use skin preference // if(isset($this->auth['preferences']['skin'])) { *************** *** 381,384 **** --- 383,397 ---- $saved_post = ''; $challenge = ''; + + // get rid of session variables and use the db author record. + if($this->sess->is_registered("comment_name")) { + $this->sess->unregister("comment_name"); + } + if($this->sess->is_registered("comment_email")) { + $this->sess->unregister("comment_email"); + } + if($this->sess->is_registered("comment_url")) { + $this->sess->unregister("comment_url"); + } // expire cache for this session |
From: Joe S. <joe...@us...> - 2003-03-26 14:41:12
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv18743/phpslash-ft/public_html Modified Files: login.php3 Log Message: remove saved comment session variables when logging in and logging out. Index: login.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/login.php3,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** login.php3 25 Mar 2003 21:27:09 -0000 1.40 --- login.php3 26 Mar 2003 14:40:34 -0000 1.41 *************** *** 55,58 **** --- 55,69 ---- $auth->auth["url"] = $author_ary['url']; + + // get rid of session variables and use the db author record. + if($sess->is_registered("comment_name")) { + $sess->unregister("comment_name"); + } + if($sess->is_registered("comment_email")) { + $sess->unregister("comment_email"); + } + if($sess->is_registered("comment_url")) { + $sess->unregister("comment_url"); + } $HTTP_GET_VARS['logout'] = ''; } |
From: Joe S. <joe...@us...> - 2003-03-26 14:41:07
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv18743/phpslash-ft Modified Files: CHANGES Log Message: remove saved comment session variables when logging in and logging out. Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.732 retrieving revision 1.733 diff -C2 -d -r1.732 -r1.733 *** CHANGES 25 Mar 2003 22:09:15 -0000 1.732 --- CHANGES 26 Mar 2003 14:40:28 -0000 1.733 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2003-March-26 8:30AM CST Joe Stewart <joe...@us...> + [W] - slashAuthCR.class, login.php3 - remove saved comment session variables when + logging in and logging out. + 2003-March-25 3:30PM CST Joe Stewart <joe...@us...> [W] - Story_base.class, storyAdmin.php3, en.php3 - return a message when |