[exim-cvs] cvs commit: exim/exim-src/src expand.c exim/exim…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: exim-cvs
Αντικείμενο: [exim-cvs] cvs commit: exim/exim-src/src expand.c exim/exim-doc/doc-txt ChangeLog
ph10 2005/10/12 11:07:01 BST

  Modified files:
    exim-src/src         expand.c 
    exim-doc/doc-txt     ChangeLog 
  Log:
  Generate an error if the third argument to ${prvs is not a single digit.


  Revision  Changes    Path
  1.248     +3 -0      exim/exim-doc/doc-txt/ChangeLog
  1.44      +12 -3     exim/exim-src/src/expand.c


  Index: expand.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/expand.c,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- expand.c    28 Sep 2005 10:46:48 -0000    1.43
  +++ expand.c    12 Oct 2005 10:07:00 -0000    1.44
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/expand.c,v 1.43 2005/09/28 10:46:48 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/expand.c,v 1.44 2005/10/12 10:07:00 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -3360,15 +3360,24 @@
         domain = Ustrrchr(sub_arg[0],'@');
         if ( (domain == NULL) || (domain == sub_arg[0]) || (Ustrlen(domain) == 1) )
           {
  -        expand_string_message = US"first parameter must be a qualified email address";
  +        expand_string_message = US"prvs first argument must be a qualified email address";
  +        goto EXPAND_FAILED;
  +        }
  +
  +      /* Calculate the hash. The second argument must be a single-digit
  +      key number, or unset. */
  +
  +      if (sub_arg[2] != NULL &&
  +          (!isdigit(sub_arg[2][0]) || sub_arg[2][1] != 0))
  +        {
  +        expand_string_message = US"prvs second argument must be a single digit";
           goto EXPAND_FAILED;
           }


  -      /* Calculate the hash */
         p = prvs_hmac_sha1(sub_arg[0],sub_arg[1],sub_arg[2],prvs_daystamp(7));
         if (p == NULL)
           {
  -        expand_string_message = US"hmac-sha1 conversion failed";
  +        expand_string_message = US"prvs hmac-sha1 conversion failed";
           goto EXPAND_FAILED;
           }



  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.247
  retrieving revision 1.248
  diff -u -r1.247 -r1.248
  --- ChangeLog    11 Oct 2005 13:50:48 -0000    1.247
  +++ ChangeLog    12 Oct 2005 10:07:00 -0000    1.248
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.247 2005/10/11 13:50:48 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.248 2005/10/12 10:07:00 ph10 Exp $


   Change log file for Exim from version 4.21
   -------------------------------------------
  @@ -14,6 +14,9 @@
         (2) Add control=submission to the relay_from_hosts and authenticated
             clients checks, on the grounds that messages accepted by these
             statements are most likely to be submissions.
  +
  +PH/02 Generate an error if the third argument for the ${prvs expansion is not
  +      a single digit.



Exim version 4.54