1. 06 Jul, 2017 6 commits
  2. 30 Jun, 2017 4 commits
    • Matthieu Gautier's avatar
      0.29.2 · 3594c2c4
      Matthieu Gautier authored
    • Matthieu Gautier's avatar
      Merge branch 'upload-permissions' into 'master' · d0aeb5ed
      Matthieu Gautier authored
      Specify the mode of uploaded files
      Closes #826
      See merge request !850
    • Mathieu Bridon's avatar
      Specify the mode of uploaded files · cbc7602b
      Mathieu Bridon authored
      When uploading files, Django has 2 different code paths:
      * if the file is smaller than 2.5MB, it is entirely in memory, then
        written to the destination path;
      * if the file is bigger than 2.5MB, it is first written in /tmp, then
        moved to the destination path;
      This means that in the first case, the mode of the destination file will
      be the default for that path, while in the second case it will be the
      default for /tmp!
      As a result, small files were uploaded with their mode set to 666, and
      big ones to 600.
      The latter means that a frontal server like Nginx, which directly serves
      static and media files, would not be able to read these uploaded files
      back as it doesn't run as the Ideascube user.
      Fortunately, Django allows specifying the mode to use in the settings,
      and then it will ensure uploaded files always have this mode, no matter
      how small or big.
      However, going further, 666 is also not a great idea as it means **any
      process** on the machine can modify these files. Only Ideascube itself
      should be able to write to these files, but they should be
      For these reasons, this commit makes us use 644 as the mode for all
      uploaded files.
      Fixes #826
    • Mathieu Bridon's avatar
      settings: Remove the finally bloc · f75a337a
      Mathieu Bridon authored
      This shouldn't be a finally, we just want to do that bloc whether the
      settings were imported from a specific module or from the fallback
  3. 29 Jun, 2017 15 commits
  4. 20 Jun, 2017 2 commits
  5. 16 Jun, 2017 4 commits
  6. 15 Jun, 2017 9 commits