]> code.citadel.org Git - citadel.git/commitdiff
tools.c: bugfixes to trim functions (Phil Slack)
authorArt Cancro <ajc@citadel.org>
Thu, 4 May 2023 22:14:10 +0000 (18:14 -0400)
committerArt Cancro <ajc@citadel.org>
Thu, 4 May 2023 22:14:10 +0000 (18:14 -0400)
libcitadel/lib/tools.c
  stripout()
    Strips too many characters.  Causes incorrect From address on inbound and probably other places.
       stripout(“Foobar<foobar@foobar.com>”) = Fooba.  Should be Foobar
    Mangles multiple boundaries. Should strip using outer boundaries.
      stripout(“ABC()(DEF)()GHI”) = ABC()(DEFGHI.  Should return ABCGHI.
  stripallbut()
    Handle outer boundaries like stripout()
      stripallbut(“ABC()(DEF)()GHI”) returns unchanged.  Should return )(DEF)(
    Code does a stderr flush.  Not sure why, but left it in.
  string_trimlen()
    Removed function.  Not used anywhere in the code and less efficient than string_trim()


No differences found