Skip to content
Snippets Groups Projects
  1. Feb 04, 2022
  2. Feb 03, 2022
  3. Feb 02, 2022
  4. Jan 31, 2022
  5. Jan 26, 2022
  6. Jan 25, 2022
  7. Jan 21, 2022
  8. Jan 13, 2022
  9. Jan 12, 2022
    • vlorentz's avatar
      Remove special handling of negative_utc · 45429e8d
      vlorentz authored
      The next release of swh-model will remove this attribute, because it was
      only a special case, and we will replace it with the generalized 'offset_bytes'.
      45429e8d
    • vlorentz's avatar
      tests: Use TimestampWithTimezone.from_datetime() instead of the constructor · 9cfc7063
      vlorentz authored
      A future release of swh-model will change its constructor's signature (replace 'offset'
      and 'negative_utc_offset' with 'offset_bytes).
      9cfc7063
    • Antoine Lambert's avatar
      api/graph: Implement anti-DoS policies for graph visits · e870ec2b
      Antoine Lambert authored
      In order to allow public access to the graph API, we need to prevent
      users to DoS the graph service with resource intensive queries.
      
      Fortunately, the graph API supports a max_edges parameter to limit the
      number of edges traversed by the graph.
      
      According to the type of user querying the graph service through the
      Web API proxy, a maximum value for the max_edges will be set before
      sending a request to the graph API.
      
      Three type of users are considered: anonymous, standard and staff.
      The maximum values for the max_edges query parameter according to
      user types are retrieved from the webapp configuration.
      
      Related to T3836
    • Antoine Lambert's avatar
      api/graph: Handle query parameters that might be passed in graph_query · 9e7732cc
      Antoine Lambert authored
      It is possible to pass query parameters in the graph_query URL argument
      of the Web API graph endpoint if the ? character is quoted.
      
      So add extra processing in the endpoint implementation to merge the
      query parameters extracted from the graph_query value and those
      coming from the django request.
      
      The purpose is to avoid some query parameters to be silently ignored
      when requesting the graph API.
      9e7732cc
  10. Jan 11, 2022
  11. Jan 10, 2022
    • Antoine Lambert's avatar
      browse/utils: Ensure to guess language from filename and not its path · 4f7f6281
      Antoine Lambert authored
      A filename must be provided as parameter to the get_hljs_language_from_filename
      function and not a path.
      
      This fixes some code highlighting issue when a filename who has a language
      associated is not in the root directory of the browsed filesystem.
      4f7f6281
    • Antoine Lambert's avatar
      browse/snapshot_context: Fix revision_found setting in directory view · 835a8601
      Antoine Lambert authored
      That variable was set in an incorrect way. As revision_id can be None,
      it should be initialized to False and set to True after checking the
      revision can be found in the archive.
      
      This fixes the non display of the "History" button in the snapshot
      directory view when a snapshot contains no revisions.
      
      Related to T3840
      835a8601
    • Antoine Lambert's avatar
      browse/snapshot_context: Handle empty revisions history in log view · 4ddf1b55
      Antoine Lambert authored
      It now exists in the archive snapshot containing only releases targeting
      directories (typically those generated by the package loaders).
      
      Thus these snapshots do not contain any revisions, this was leading to a
      server error when trying to browse their history view.
      
      Now a 404 error will be returned when trying to browse the revisions
      history of such snapshots.
      
      Related to T3840
      4ddf1b55
  12. Jan 05, 2022
  13. Jan 04, 2022
  14. Dec 16, 2021
  15. Dec 14, 2021
  16. Dec 13, 2021
Loading