Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Jun 26, 2024
  2. Jun 25, 2024
  3. Jun 24, 2024
    • Cal Herries's avatar
    • adam-james's avatar
      Sanitize SVG before parsing with Batik to prevent render failures when invalid... · a27c1510
      adam-james authored
      Sanitize SVG before parsing with Batik to prevent render failures when invalid characters are in the SVG content (#44516)
      
      * Add Temporal Units List to Dashboard Parameters Schema
      
      Closes: #44361
      
      This adds an entry to the Dashboard Parameter schema so that we can validate
      the list of temporal_units that might be passed from the frontend when adding
      or updating the `Unit of Time` type parameters.
      
      * Sanitize the SVG before parsing it with Batik
      
      WIP
      
      Fixes: #43677
      
      There are characters that are invalid according to the Batik XML Parser. This sanitizes the svg string to strip out
      some of those characters so that the render can continue.
      
      * Use the xml 1.0 spec allowed unicode chars list for the regex
      
      * Remove accidentally merged code
      
      * still miseed a line
      Unverified
      a27c1510
    • Case Nelson's avatar
      fix: dont always optimize between expressions (#44493) · 63179270
      Case Nelson authored
      * fix: dont always optimize between expressions
      
      Fixes #42291
      
      The frontend produces expressions like
      
      ```
      [:between
       [+ [:field ... {:temporal-bucket :day] [:interval 2 :day]]
       [:relative-datetime -1 :week]
       [:relative-datetime 0 :week]]
      ```
      
      This should not be optimized because of the mixed `:day` and `:week`
      units. However, it was being optimized since the compatible units
      weren't being properly picked up by the match.
      
      * Disable suspcicios args eastwood lint, kondo does it better
      
      * Stop autobucket to day when adding a time interval
      Unverified
      63179270
Loading