1. 03 Sep, 2014 6 commits
    • Alex Vandiver's avatar
      Make RT::Action::SendEmail->SetHeader take characters, not bytes · 12c2671c
      Alex Vandiver authored
      This helper method is used in a number of places in
      RT::Action::SendEmail, often without remembering that it should be
      passed bytes, not characters.  Change it to always take characters, and
      modify the two callsite which (correctly) passed it bytes to no longer
      do so.
    • Alex Vandiver's avatar
      Ensure all MIME::Entity headers are UTF-8 encoded bytes · 41d084f1
      Alex Vandiver authored
      Placing wide characters into MIME::Entity objects can lead to
      double-encoding, as discovered most recently in d469cacc.  Explicitly
      decode all headers as UTF-8 when retrieving them with ->get(), and
      encode them as UTF-8 before updating them with ->set() or ->replace().
      This also applies to headers passed to ->build().  The only exceptions
      to this are fixed strings in the source (which, in the absence of "use
      utf8", are always bytes).
      While the majority of these headers will never have wide characters in
      them, always decoding and encoding ensures the proper disipline to
      guarantee that strings with the "UTF8" flag do not get placed in a
      header, which can cause double-encoding.
    • Alex Vandiver's avatar
      Ensure all MIME::Entity bodies are UTF-8 encoded bytes · 6d9bd63c
      Alex Vandiver authored
      Placing wide characters into MIME::Entity objects can lead to
      double-encoding.  Always treat them as byte stores, encoding as UTF-8
      and noting their character set.
      In the case of Approvals/index.html, there was no need for an explicit
      MIME::Entity object; ->Correspond creates one as needed from a "Content"
    • Alex Vandiver's avatar
      The alluded-to deficiency is not a concern in perl ≥ 5.8.3 · 18ef9b24
      Alex Vandiver authored
      The comment and code were added in RT 2.1.38, which only required perl
      5.6.1; the perl version was increased to 5.8.3 to cover a large number
      of encoding bugs, such as the one this comment was likely alluding to.
    • Alex Vandiver's avatar
      Always log bytes, not characters · a275a7fa
      Alex Vandiver authored
      Ensure that we always send UTF-8 encoded bytes to loggers, and not wide
      characters.  This is correctly done via an explicit call to
      Encode::encode, and not via checks of utf8::is_utf8 (which may be false
      for character strings with codepoints > 127 but < 256), and not via
      _utf8_off (which would fail similarly for such characters).
    • Alex Vandiver's avatar
      Modernize and condense t/mail/sendmail.t and t/mail/sendmail-plaintext.t · 15dde68b
      Alex Vandiver authored
      t/data/emails/text-html-in-russian was removed because the original
      purpose of the test was removed in 46fd04d9, after 90f9c190 stopped
      attaching text/html incoming mail to autoreplies.
  2. 02 Sep, 2014 4 commits
  3. 28 Aug, 2014 1 commit
    • Kevin Falcone's avatar
      Allow modification of which types of links are shown · 191f789c
      Kevin Falcone authored
      There's a callback to add data at the end of the Links portlet, but
      nothing to allow you to change what's display.  This provides a callback
      that would let you remove (for example) the Parents from the listing, so
      that you can list them in a separate portlet later, with a custom
  4. 27 Aug, 2014 4 commits
  5. 25 Aug, 2014 2 commits
  6. 19 Aug, 2014 2 commits
  7. 18 Aug, 2014 6 commits
  8. 15 Aug, 2014 4 commits
  9. 13 Aug, 2014 7 commits
    • Kevin Falcone's avatar
      Allow the SuccessfulLogin callback to change where a user Redirects to · 6a923e70
      Kevin Falcone authored
      This allows an extension to overwrite a user's intended destination, or
      more usefully, detect when someone is logging in at the top level and
      redirect instead to a Dashboard (or in RTIR's case, to /RTIR/).
    • Kevin Falcone's avatar
      Allow extra arguments to be passed to ShowHistory · ec0bb0d9
      Kevin Falcone authored
      RTIR wants to customize a number of paths during history display (see
      RTIR/Display.html and RTIR/Incident/Display.html).  In order to use
      delayed history loading, RTIR either needs to pass those as GET
      arguments (allowing user injection of paths that we use to build links,
      which is dangerous without sanitation) or otherwise get them to
      With this, RTIR can just callback in the custom arguments (you can also
      clobber any of the other arguments to ShowHistory with it).
    • Kevin Falcone's avatar
      Ignore vim swap files when testing · 1dd472e6
      Kevin Falcone authored
      mason-syntax already ignored swp files, but would try to compile swo
      files.  t/web/helper-http-cache-headers.t made no attempt to ignore
      anything, so if you're hacking on a Helper this test will fail
    • Kevin Falcone's avatar
      Still delay loading when showing headers · 1ff7f30c
      Kevin Falcone authored
      In 75a405b5 we added the ForceShowHistory flag to Click to load history
      so that even if your JS was off, clicking on the link would load the
      This flag is also found in the Show Headers links added in 1a3327ce
      and I think added so that when you clicked on ShowHeaders with Click to
      load enable, you didn't *then* have to click on "Load history" just to
      see the headers.
      However, with delay, we already passed ShowHeaders to the helper, but
      clicking on Show Headers forced us to do the page load inline instead.
      This negates all of the perceived speed boost from delayed loading.
      Removing it from the delay case hasn't immediately broken things, and
      the delayed loading really doesn't play well with having JS off anyway.
    • sunnavy's avatar
      make attachment truncate/drop and error txns more noticeable · 4aaa1324
      sunnavy authored
      color scheme is from cloos++
    • sunnavy's avatar
      test attachment dropping/truncation · 15452374
      sunnavy authored
    • sunnavy's avatar
      record attachments' dropping/truncation as txns · 15dddd2e
      sunnavy authored
  10. 11 Aug, 2014 1 commit
    • Todd Wade's avatar
      add a way to give an attribute an ObjectType besides RT::System · e7290b0e
      Todd Wade authored
      This code allows you to provide a code ref in the Object field in an Attribute
      initialdata hash that returns an object that can be used as the ObjectType for
      the Attribute:
      @Attributes = ({
          Name        => 'SavedSearch',
          Description => 'New Tickets in SomeQueue',
          Object      => sub {
              my $GroupName = 'SomeQueue Group';
              my $group     = RT::Group->new( RT->SystemUser );
              my( $ret, $msg ) = $group->LoadUserDefinedGroup( $GroupName );
              die $msg unless $ret;
              return $group;
          Content     => {
              Format =>  <<'        END_OF_FORMAT',
              Query   => "Status = 'new' AND Queue = 'SomeQueue'",
              OrderBy => 'id',
              Order   => 'DESC'
  11. 06 Aug, 2014 2 commits
    • Kevin Falcone's avatar
      Allow @Groupings to be passed in · b1ba2c3d
      Kevin Falcone authored
      The display template (ShowCustomFieldCustomGroupings) takes Groupings as
      an argument, for symmetry, also take it during editing.
      This allows code to better control which groups are shown
      on Create or other editing pages (in particular, RTIR and the multitude
      of complex editing/creating pages in that workflow).
    • Kevin Falcone's avatar
      RT::CustomField provides a wrapper to get the 'type', use it · 4abd0fa2
      Kevin Falcone authored
      Hardcoding ref here meant that if anything extends
      RT::CustomField->_GroupingClass, it'll fail to find the groupings and
      dump all your CFs into the Custom Fields group.  By calling back in to
      GroupingClass, you get the 'magic' type and can look it up in the
      NewItem provides an empty CustomField with ContextObject set which
      overriders of _GroupingClass can use for more context when
      LimitoToGrouping is called on an empty object (during object creation)
      RTIR uses this to provide an RTIR::Ticket grouping type so you can
      separate CF groupings on RTIR tickets from those on core tickets.
      Provided to allow better separation of groupings between RTIR CFs and
      CFs on other Queues, especially since RTIR uses common names such as
      'Customer' and 'IP' which would otherwise complicate using those CFs in
      groups in other Queues. Perhaps points towards wanting per-queue CF
  12. 05 Aug, 2014 1 commit