1. 17 Mar, 2021 1 commit
    • Richard Pospesel's avatar
      Bug 23247: Communicating security expectations for .onion · 3b0641f3
      Richard Pospesel authored and Matthew Finkel's avatar Matthew Finkel committed
      Encrypting pages hosted on Onion Services with SSL/TLS is redundant
      (in terms of hiding content) as all traffic within the Tor network is
      already fully encrypted.  Therefore, serving HTTP pages from an Onion
      Service is more or less fine.
      
      Prior to this patch, Tor Browser would mostly treat pages delivered
      via Onion Services as well as pages delivered in the ordinary fashion
      over the internet in the same way.  This created some inconsistencies
      in behaviour and misinformation presented to the user relating to the
      security of pages delivered via Onion Services:
      
       - HTTP Onion Service pages did not have any 'lock' icon indicating
         the site was secure
       - HTTP Onion Service pages would be marked as unencrypted in the Page
         Info screen
       - Mixed-mode content restrictions did not apply to HTTP Onion Service
         pages embedding Non-Onion HTTP content
      
      This patch fixes the above issues, and also adds several new 'Onion'
      icons to the mix to indicate all of the various permutations of Onion
      Services hosted HTTP or HTTPS pages with HTTP or HTTPS content.
      
      Strings for Onion Service Page Info page are pulled from Torbutton's
      localization strings.
      3b0641f3
  2. 24 Apr, 2020 1 commit
  3. 20 Apr, 2020 1 commit
  4. 09 Mar, 2020 1 commit
  5. 20 Jan, 2020 2 commits
    • Emilio Cobos Álvarez's avatar
      Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj · 256c124f
      Emilio Cobos Álvarez authored
      This was done by:
      
      This was done by applying:
      
      ```
      diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
      index 789affde7bbf..fe33c4c7d4d1 100644
      --- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
      +++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
      @@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
               from subprocess import Popen, PIPE, check_output, CalledProcessError
      
               diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
      -        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
      +        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']
      
               if not output_file:
                   args.append("-i")
      ```
      
      Then running `./mach clang-format -c <commit-hash>`
      
      Then undoing that patch.
      
      Then running check_spidermonkey...
      256c124f
    • Emilio Cobos Álvarez's avatar
      Bug 1609996 - Remove mozilla/Move.h. r=froydnj · aa3a6957
      Emilio Cobos Álvarez authored
      rg -l 'mozilla/Move.h' | xargs sed -i 's/#include "mozilla\/Move.h"/#include <utility>/g'
      
      Further manual fixups and cleanups to the include order incoming.
      
      Differential Revision: https://phabricator.services.mozilla.com/D60323
      
      --HG--
      extra : moz-landing-system : lando
      aa3a6957
  6. 06 Dec, 2019 1 commit
    • Gabriele Svelto's avatar
      Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan · ace6d106
      Gabriele Svelto authored
      The inclusions were removed with the following very crude script and the
      resulting breakage was fixed up by hand. The manual fixups did either
      revert the changes done by the script, replace a generic header with a more
      specific one or replace a header with a forward declaration.
      
      find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
          interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
          if [ -n "$interfaces" ]; then
              if [[ "$interfaces" == *$'\n'* ]]; then
                regexp="\("
                for i in $interfaces; do regexp="$regexp$i\|"; done
                regexp="${regexp%%\\\|}\)"
              else
                regexp="$interfaces"
              fi
              interface=$(basename "$path")
              rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
                  hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
                  if [ $h...
      ace6d106
  7. 05 Dec, 2019 1 commit
  8. 04 Dec, 2019 2 commits
    • Dorel Luca's avatar
    • Gabriele Svelto's avatar
      Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan · bc9290f7
      Gabriele Svelto authored
      The inclusions were removed with the following very crude script and the
      resulting breakage was fixed up by hand. The manual fixups did either
      revert the changes done by the script, replace a generic header with a more
      specific one or replace a header with a forward declaration.
      
      find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
          interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
          if [ -n "$interfaces" ]; then
              if [[ "$interfaces" == *$'\n'* ]]; then
                regexp="\("
                for i in $interfaces; do regexp="$regexp$i\|"; done
                regexp="${regexp%%\\\|}\)"
              else
                regexp="$interfaces"
              fi
              interface=$(basename "$path")
              rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
                  hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
                  if [ $hits -eq 0 ]; then
                      echo "Removing ${interface} from ${path2}"
                      grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                      mv -f "$path2".tmp "$path2"
                  fi
              done
          fi
      done
      
      Differential Revision: https://phabricator.services.mozilla.com/D55442
      
      --HG--
      extra : moz-landing-system : lando
      bc9290f7
  9. 28 Nov, 2019 2 commits
  10. 26 Nov, 2019 2 commits
  11. 22 Nov, 2019 1 commit
  12. 21 Nov, 2019 1 commit
  13. 26 Jul, 2019 1 commit
  14. 08 Jul, 2019 1 commit
  15. 25 Feb, 2019 1 commit
  16. 03 Jan, 2019 1 commit
    • Emilio Cobos Álvarez's avatar
      Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug · d2ed2608
      Emilio Cobos Álvarez authored
      Summary: Really sorry for the size of the patch. It's mostly automatic
      s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
      add the right namespacing and such.
      
      Overall it's not a very interesting patch I think.
      
      nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
      nsIDocumentInlines.h into DocumentInlines.h.
      
      I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.
      
      While fixing up some of the bits I also removed some unneeded OwnerDoc() null
      checks and such, but I didn't do anything riskier than that.
      d2ed2608
  17. 30 Nov, 2018 1 commit
  18. 14 Aug, 2018 1 commit
    • Henri Sivonen's avatar
      Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj. · 3edc6013
      Henri Sivonen authored
      Correctness improvements:
      
       * UTF errors are handled safely per spec instead of dangerously truncating
         strings.
      
       * There are fewer converter implementations.
      
      Performance improvements:
      
       * The old code did exact buffer length math, which meant doing UTF math twice
         on each input string (once for length calculation and another time for
         conversion). Exact length math is more complicated when handling errors
         properly, which the old code didn't do. The new code does UTF math on the
         string content only once (when converting) but risks allocating more than
         once. There are heuristics in place to lower the probability of
         reallocation in cases where the double math avoidance isn't enough of a
         saving to absorb an allocation and memcpy.
      
       * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
         but a single non-ASCII code point pessimized the rest of the string. The
         new code tries to get back on the fast ASCII path.
      
       * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
         input to eliminate an operation from the inner loop on x86/x86_64.
      
       * When assigning to a pre-existing string, the new code tries to reuse the
         old buffer instead of first releasing the old buffer and then allocating a
         new one.
      
       * When reallocating from the new code, the memcpy covers only the data that
         is part of the logical length of the old string instead of memcpying the
         whole capacity. (For old callers old excess memcpy behavior is preserved
         due to bogus callers. See bug 1472113.)
      
       * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
         SpiderMonkey as Latin1.
      
      New features:
      
       * Conversion between UTF-8 and Latin1 is added in order to enable faster
         future interop between Rust code (or otherwise UTF-8-using code) and text
         node and SpiderMonkey code that uses Latin1.
      
      MozReview-Commit-ID: JaJuExfILM9
      3edc6013
  19. 27 Jun, 2018 1 commit
  20. 01 Jun, 2018 1 commit
  21. 26 Oct, 2017 1 commit
  22. 22 Sep, 2017 1 commit
  23. 09 Aug, 2017 1 commit
  24. 29 Aug, 2017 1 commit
  25. 25 Jun, 2017 1 commit
  26. 18 Jun, 2017 1 commit
  27. 25 Jun, 2017 1 commit
  28. 18 Jun, 2017 1 commit
  29. 21 Jun, 2017 1 commit
  30. 26 Jun, 2017 1 commit
  31. 18 Jun, 2017 1 commit
  32. 20 Jun, 2017 2 commits
  33. 14 Apr, 2017 1 commit
  34. 09 Nov, 2017 1 commit
  35. 12 Jan, 2017 1 commit