i18n/polib.LICENSE
author Augie Fackler <augie@google.com>
Wed, 12 Apr 2017 11:23:55 -0700
branchstable
changeset 32050 77eaf9539499
parent 11387 181936ec9bfb
permissions -rw-r--r--
dispatch: protect against malicious 'hg serve --stdio' invocations (sec) Some shared-ssh installations assume that 'hg serve --stdio' is a safe command to run for minimally trusted users. Unfortunately, the messy implementation of argument parsing here meant that trying to access a repo named '--debugger' would give the user a pdb prompt, thereby sidestepping any hoped-for sandboxing. Serving repositories over HTTP(S) is unaffected. We're not currently hardening any subcommands other than 'serve'. If your service exposes other commands to users with arbitrary repository names, it is imperative that you defend against repository names of '--debugger' and anything starting with '--config'. The read-only mode of hg-ssh stopped working because it provided its hook configuration to "hg serve --stdio" via --config parameter. This is banned for security reasons now. This patch switches it to directly call ui.setconfig(). If your custom hosting infrastructure relies on passing --config to "hg serve --stdio", you'll need to find a different way to get that configuration into Mercurial, either by using ui.setconfig() as hg-ssh does in this patch, or by placing an hgrc file someplace where Mercurial will read it. mitrandir@fb.com provided some extra fixes for the dispatch code and for hg-ssh in places that I overlooked.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11387
181936ec9bfb i18n: import polib 0.5.2 (rev b0ab301cfdcc)
Wagner Bruna <wbruna@yahoo.com>
parents:
diff changeset
     1
copyright (c) 2006-2010 David JEAN LOUIS
181936ec9bfb i18n: import polib 0.5.2 (rev b0ab301cfdcc)
Wagner Bruna <wbruna@yahoo.com>
parents:
diff changeset
     2
181936ec9bfb i18n: import polib 0.5.2 (rev b0ab301cfdcc)
Wagner Bruna <wbruna@yahoo.com>
parents:
diff changeset
     3
Permission is hereby granted, free of charge, to any person obtaining a copy
181936ec9bfb i18n: import polib 0.5.2 (rev b0ab301cfdcc)
Wagner Bruna <wbruna@yahoo.com>
parents:
diff changeset
     4
of this software and associated documentation files (the "Software"), to deal
181936ec9bfb i18n: import polib 0.5.2 (rev b0ab301cfdcc)
Wagner Bruna <wbruna@yahoo.com>
parents:
diff changeset
     5
in the Software without restriction, including without limitation the rights
181936ec9bfb i18n: import polib 0.5.2 (rev b0ab301cfdcc)
Wagner Bruna <wbruna@yahoo.com>
parents:
diff changeset
     6
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
181936ec9bfb i18n: import polib 0.5.2 (rev b0ab301cfdcc)
Wagner Bruna <wbruna@yahoo.com>
parents:
diff changeset
     7
copies of the Software, and to permit persons to whom the Software is
181936ec9bfb i18n: import polib 0.5.2 (rev b0ab301cfdcc)
Wagner Bruna <wbruna@yahoo.com>
parents:
diff changeset
     8
furnished to do so, subject to the following conditions:
181936ec9bfb i18n: import polib 0.5.2 (rev b0ab301cfdcc)
Wagner Bruna <wbruna@yahoo.com>
parents:
diff changeset
     9
181936ec9bfb i18n: import polib 0.5.2 (rev b0ab301cfdcc)
Wagner Bruna <wbruna@yahoo.com>
parents:
diff changeset
    10
The above copyright notice and this permission notice shall be included in all
181936ec9bfb i18n: import polib 0.5.2 (rev b0ab301cfdcc)
Wagner Bruna <wbruna@yahoo.com>
parents:
diff changeset
    11
copies or substantial portions of the Software.
181936ec9bfb i18n: import polib 0.5.2 (rev b0ab301cfdcc)
Wagner Bruna <wbruna@yahoo.com>
parents:
diff changeset
    12
181936ec9bfb i18n: import polib 0.5.2 (rev b0ab301cfdcc)
Wagner Bruna <wbruna@yahoo.com>
parents:
diff changeset
    13
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
181936ec9bfb i18n: import polib 0.5.2 (rev b0ab301cfdcc)
Wagner Bruna <wbruna@yahoo.com>
parents:
diff changeset
    14
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
181936ec9bfb i18n: import polib 0.5.2 (rev b0ab301cfdcc)
Wagner Bruna <wbruna@yahoo.com>
parents:
diff changeset
    15
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
181936ec9bfb i18n: import polib 0.5.2 (rev b0ab301cfdcc)
Wagner Bruna <wbruna@yahoo.com>
parents:
diff changeset
    16
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
181936ec9bfb i18n: import polib 0.5.2 (rev b0ab301cfdcc)
Wagner Bruna <wbruna@yahoo.com>
parents:
diff changeset
    17
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
181936ec9bfb i18n: import polib 0.5.2 (rev b0ab301cfdcc)
Wagner Bruna <wbruna@yahoo.com>
parents:
diff changeset
    18
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
181936ec9bfb i18n: import polib 0.5.2 (rev b0ab301cfdcc)
Wagner Bruna <wbruna@yahoo.com>
parents:
diff changeset
    19
SOFTWARE.