[Kolab-devel] Patch: Server Local Networks field

Stephan Buys list at codefusion.co.za
Wed Sep 17 12:42:52 CEST 2003


This is not directly related. It just adds some sanity checks to the Text field
in the Kolab admin interface.

I suggest you use the Kolab admin interface and remove your ADSL network
from the local networks text field.

Regards,
Stephan

On Wednesday 17 September 2003 09:22, Maarten Stolte wrote:
> Hello,
>
> excuse my ignorance, but does this also apply to my (not earlier
> reported) problem, where postfix sets a network to allow based on my ip
> from my ADSL line, which should not be done imho, at least, it would
> allow everyone in that part of my providers network to use my machine as
> a relay, or wouldnt it?
>
> Maarten
>
> On Wed, 2003-09-17 at 08:11, Stephan Buys wrote:
> > There has been no objections so far. Should I commit this? (Martin,
> > certainly you want to handle this for the stable version?)
> >
> > Regards,
> > Stephan
> >
> > On Tuesday 09 September 2003 12:46, Stephan Buys wrote:
> > > Hi all,
> > >
> > > Here is a patch for the bug reported on the list a couple of days ago.
> > > It attempts to enforce proper formatting on the list of networks
> > > provided to LDAP from the Local Networks field.
> > >
> > > Regards,
> > > Stephan
> > >
> > > Index: index.php
> > > ===================================================================
> > > RCS file: /kolabrepository/server/kolab/kolab/admin/server/index.php,v
> > > retrieving revision 1.6.2.1
> > > diff -u -p -r1.6.2.1 index.php
> > > --- index.php   18 Jul 2003 01:39:07 -0000      1.6.2.1
> > > +++ index.php   9 Sep 2003 10:48:44 -0000
> > > @@ -102,8 +102,18 @@ if (!$errors) {
> > >                  ldap_free_result($result);
> > >               }
> > >           }
> > > -         if ($mynetworks) $attrs['postfix-mynetworks'][0] =
> > > $mynetworks; +         if ($mynetworks) {
> > > +           #Do some basic sanity checks
> > > +           preg_match_all ("/(\d+\.\d+\.\d+\.\d+\/\d+)/x",
> > > +               $mynetworks, $networks);
> > > +           for ($i = 0; $i < count($networks[0])-1; $i++) {
> > > +               $parsednetworks = $parsednetworks.$networks[0][$i].",
> > > "; +           }
> > > +           $parsednetworks =
> > > $parsednetworks.$networks[0][count($networks[0])-1];
> > >
> > > +           $attrs['postfix-mynetworks'][0] = $parsednetworks;
> > > +
> > > +        }
> > >           if (!ldap_modify
> > > ($link,"k=kolab,".$_SESSION['base_dn'],$attrs)) array_push($errors,
> > > "LDAP Error: failed to modify kolab config object ".ldap_error($link));
> > > break;
> > > @@ -143,6 +153,7 @@ if (!$errors) {
> > >  }
> > >
> > >  print("</center></td></tr></table>\n");
> > > +
> > >
> > >  if ($errors) {
> > >     print("<TABLE WIDTH=\"80%\" CELLSPACING=20 CELLPADDING=0
> > > BORDER=0>\n");
> > >
> > > _______________________________________________
> > > Kolab-devel mailing list
> > > Kolab-devel at intevation.org
> > > https://kroupware.org/mailman/listinfo/kolab-devel
> >
> > _______________________________________________
> > Kolab-devel mailing list
> > Kolab-devel at intevation.org
> > https://kroupware.org/mailman/listinfo/kolab-devel
>
> _______________________________________________
> Kolab-devel mailing list
> Kolab-devel at intevation.org
> https://kroupware.org/mailman/listinfo/kolab-devel

-- 
Stephan  Buys
Code Fusion cc.
Tel: +27 11 391 1412
Mobile: +27 83 294 1876
Email: s.buys at codefusion.co.za




More information about the devel mailing list