Skip to content
Snippets Groups Projects
  1. Mar 16, 2021
  2. Mar 13, 2021
    • Martin Vahlensieck's avatar
      Use correct port when redirected · 8e993fe9
      Martin Vahlensieck authored and Timo Teräs's avatar Timo Teräs committed
      If server redirects from http to https, libfetch detects this, but
      wrongly uses the old url scheme to determine the port. This subsequently
      leads to the following OpenSSL error:
      
      139741541575496:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:ssl/record/ssl3_record.c:331:
      
      Using the new scheme fixes this.  This error message comes from trying
      to connect to port 80 with TLS, it can also be observed by issuing
        $ openssl s_client -connect alpinelinux.org:80
      
      This bug was introduced in commit:
      7158474f libfetch: keep http auth only if redirect is for the same host
      8e993fe9
  3. Feb 07, 2021
  4. Feb 04, 2021
    • Timo Teräs's avatar
      db: consider control characters in filename as malicious · 1a4f2e94
      Timo Teräs authored
      
      Especially a newline can produce havoc in the database file as
      the filename is written there as-is. This hardenes the extraction
      to consider any control character as malicious. Additional
      hardening is added to database loading to better detect corrupt
      state and return proper error code about it.
      
      Reported-by: default avatarLuca Weiss <luca@z3ntu.xyz>
      1a4f2e94
    • Olliver Schinagl's avatar
      io: Handle really long lines · f6656f9d
      Olliver Schinagl authored and Timo Teräs's avatar Timo Teräs committed
      
      While commit 18b0b45b (io: Handle long lines, Thu Jan 7 17:25:23 2021
      +0100) did attempt to address this issue, the buffer really is still to
      small when dealing with big-big dependency lists.
      
      Lets make it sufficiently large for now, until the new APKINDEX format
      can support multi-line dependencies, making this not needed any more.
      
      [TT: Originally the buffer size was conservative to run on resource
      constrained embedded platforms. But since the available memory on those
      has also increased much, the adjustment to 128kB makes sense also to
      increase performance a little bit. Removing also the iolimit test.]
      
      Signed-off-by: default avatarOlliver Schinagl <oliver@schinagl.nl>
      f6656f9d
    • Timo Teräs's avatar
      gunzip: fix false end-of-file condition in rare circumstances · b43da45b
      Timo Teräs authored
      It turns out inflate() can output zero bytes, even if it consumed
      data. This had the unfortunate side effect of returning zero bytes
      (end-of-file) condition before calling the boundary callbacks. This
      fixes the logic to not return zero reads on gzip boundary.
      
      In practice this fixes the seldom seen issues of apk reporting
      bad signature (when it was correct).
      b43da45b
  5. Jan 27, 2021
  6. Jan 19, 2021
    • Timo Teräs's avatar
      libfetch: harden URL parsing · bcbcbfc1
      Timo Teräs authored
      Treat URLs with too long individual components as malformed instead
      of silently truncating that field. There might be unexpected results
      if hostname, username or password field gets truncated.
      bcbcbfc1
    • Timo Teräs's avatar
      libfetch: fix connection pooling for proxied http/https requests · acca5cbf
      Timo Teräs authored
      The connection pooling was broken in two ways:
      
       1. The original URL was always used as the connection pool URL,
          resulting in duplicate connections to the proxy for http URLs
          (each http URL would get separate proxy connection)
      
       2. The cache_url stored was always the socket level connect URL.
          In case of HTTPS, the lookup was done done with the real URL,
          but the proxy URL was stored as the "cache URL". Thus HTTPS
          CONNECT connections were never re-used.
      
      This fixes the code with following logic:
      
       1. The cache key url is the real URL when no-proxy, or when HTTPS
          with proxy (the socket is connected to proxy, but logically it
          is connected to the real URL due to HTTP CONNECT request).
          And for HTTP with proxy, it's the proxy URL so same proxy
          connection can be reused for all requests going through it.
      
       2. fetch_connect() now gets cache key URL separately, and it always
          gets the same value as the fetch_cache_get() calls.
      acca5cbf
    • Timo Teräs's avatar
    • Conny Seifert's avatar
      libfetch: fix parsing of proxy response to CONNECT requests · 4087ab92
      Conny Seifert authored and Timo Teräs's avatar Timo Teräs committed
      Instead of skipping just one line, properly parse the response headers.
      
      [TT: reworded commit message]
      4087ab92
  7. Jan 17, 2021
  8. Jan 14, 2021
  9. Jan 11, 2021
  10. Jan 08, 2021
  11. Dec 29, 2020
  12. Nov 11, 2020
  13. Nov 10, 2020
  14. Oct 09, 2020
Loading