Commit Graph

4137 Commits

Author SHA1 Message Date
Matt Harbison
405dd67275 ensure each message line printed in the Mercurial hook gets a trailing newline
I noticed that the exception printed in the previous commit started on the same
line as the print for the `str(e)` case right before it.  Since this also prints
the content of urllib2.URLError.read(), it seems better to remove any existing
newline and re-add it, than to just assume the `str(e)` case was the only
problem.
2018-06-22 16:42:05 -04:00
Matt Harbison
2d103b7f95 optionally print tracebacks when the Mercurial hook swallows an exception
If `ui.traceback=True` is set on the server, this prints the stacktrace for the
exception on the client side.  Otherwise, nothing happens.  I tried allowing the
exception to propagate back to Mercurial, but then the client sees this message
with 4.4.2 and 4.6.1:

    abort: remote error:
    Mercurial/Python process ends with return code 1

Something odd changed when upgrading from CentOS 7.4 to 7.5 around forwarding
requests from the loopback address that I don't fully understand.  First, we
were getting a ValueError from inside `opener.open()` saying that 'localhost'
didn't match the host listed in the SSL certificate.  That wasn't visible until
adding this.

Then what happened is a connection refused out of the same function, so the
traceback is added to the other handler too.  Running the equivalent command on
the command line from the 'vcs' host stopped working in 7.5:

  $ curl https://vcs.domain.com/hook/hg/?ping=true
  curl: (7) Failed connect to vcs.domain.com:443; Connection refused

But it works when run on another machine targeting that same 'vcs' host.  Adding
another firewall rule allows everything to work from the 'vcs' host again:

  $ iptables -t nat -I OUTPUT -p tcp -o lo --dport 443 -j REDIRECT --to-ports 8443
2018-06-22 16:33:52 -04:00
Matt Harbison
a051eb159c #989 load global configuration in hgweb on Mercurial 4.1 and later 2018-06-22 16:06:35 -04:00
Sebastian Sdorra
e826b833cc switch from jersey 1.x to resteasy 2017-06-27 20:16:05 +02:00
Sebastian Sdorra
3f27dd8cca [maven-release-plugin] prepare for next development iteration 2018-05-04 11:14:45 +02:00
Sebastian Sdorra
0ba7fab12c [maven-release-plugin] copy for tag 1.60 2018-05-04 11:14:45 +02:00
Sebastian Sdorra
a0b3b154c8 [maven-release-plugin] prepare release 1.60 1.60 2018-05-04 11:14:45 +02:00
Sebastian Sdorra
b76fa9b59a merge with branch issue-979 2018-05-04 09:09:05 +02:00
Sebastian Sdorra
418ad370e2 close branch issue-979 2018-05-04 09:07:18 +02:00
Sebastian Sdorra
41dea47413 #979 rename KeyStore to SecretKeyStore 2018-05-04 07:20:07 +02:00
Sebastian Sdorra
f345972935 #979 change encryption key prefix from enc to SKV2 (scm key version 2) 2018-04-30 11:01:00 +02:00
Sebastian Sdorra
40b5ef485b #979 encrypt the configuration keys before they are written to prefs 2018-04-30 09:36:51 +02:00
Sebastian Sdorra
cbecb3731b #979 use a java 7 compatible cipher spec 2018-04-30 09:27:00 +02:00
Sebastian Sdorra
3ee0bcedac #979 encrypt cli configuration with aes instead of pbe 2018-04-18 14:41:38 +02:00
Sebastian Sdorra
d9e7de8202 #979 improve javadoc 2018-04-18 08:09:28 +02:00
Sebastian Sdorra
a55dd9873b #979 split implementation of ScmClientConfigFileHandler in order to create new more secure implementation 2018-04-17 22:00:54 +02:00
Sebastian Sdorra
b8456d364c update commons-daemon to version 1.1.0 2018-04-13 23:32:50 +02:00
Sebastian Sdorra
b8144b514e ignore module-info for enforceBytecodeVersion rule 2018-04-13 16:23:33 +02:00
Sebastian Sdorra
c56291490e merge with branch issue-972 2018-04-12 20:23:23 +02:00
Sebastian Sdorra
966c18eca1 close branch issue-972 2018-04-12 20:22:40 +02:00
Sebastian Sdorra
0fc9f6d485 use APIviz only for javadoc of scm-core 2018-04-12 20:21:22 +02:00
Sebastian Sdorra
68006b322d removed unused import from GroupCollectorTest 2018-04-12 20:20:32 +02:00
Sebastian Sdorra
bfee6331e1 fix build on java 9 2018-04-12 13:15:04 +02:00
Sebastian Sdorra
b568b9ee93 fix some maven warnings 2018-04-12 12:41:58 +02:00
Sebastian Sdorra
7d6c65799e #972 use javahg version which is compatible with java 7 2018-04-12 11:57:00 +02:00
Sebastian Sdorra
c841e72dcb #972 encforce jdk 7 bytecode for dependencies 2018-04-12 11:34:00 +02:00
Sebastian Sdorra
247ee63a95 [maven-release-plugin] prepare for next development iteration 2018-04-11 10:09:12 +02:00
Sebastian Sdorra
39ceb11e9b [maven-release-plugin] copy for tag 1.59 2018-04-11 10:09:11 +02:00
Sebastian Sdorra
92a492f68b [maven-release-plugin] prepare release 1.59 1.59 2018-04-11 10:09:11 +02:00
Sebastian Sdorra
7f0ae1c472 Merged in gstefanik/scm-manager-2/gstefanik/make-extras-work-on-old-versions-of-hg-1523046585738 (pull request #41)
make {extras} work on old versions of Hg
2018-04-11 07:34:58 +00:00
Gábor Stefanik
e230c0f4cd make {extras} work on old versions of Hg 2018-04-06 20:30:15 +00:00
Sebastian Sdorra
7ed4dbcf00 fix hgweb execution for mercurial versions prior 4.1 2018-04-06 14:01:00 +02:00
Sebastian Sdorra
dd313036ff [maven-release-plugin] prepare for next development iteration 2018-04-06 08:28:51 +02:00
Sebastian Sdorra
5575b4cd11 [maven-release-plugin] copy for tag 1.58 2018-04-06 08:28:51 +02:00
Sebastian Sdorra
482589fc67 [maven-release-plugin] prepare release 1.58 1.58 2018-04-06 08:28:50 +02:00
Sebastian Sdorra
49168b10a7 update apache shiro to version 1.3.2 2018-04-05 21:59:41 +02:00
Sebastian Sdorra
4e58b82373 update fron sonatype aether to eclipse aether 1.1.0 2018-04-05 21:58:00 +02:00
Sebastian Sdorra
528f763634 removed never released scm-dao-orientdb module 2018-04-05 20:35:48 +02:00
Sebastian Sdorra
8af69c4e99 update vulnerable dependencies
commons-beanutils to 1.9.3
commons-collections to 3.2.2
httpclient to 4.5.5
slf4j to 1.7.25
logback to 1.2.3
jackson to 1.9.13
2018-04-05 19:56:15 +02:00
Sebastian Sdorra
ff2afceb55 update javahg to version 0.13 2018-04-05 19:48:04 +02:00
Sebastian Sdorra
fe531900e4 merge with branch issue-970 2018-04-05 18:45:12 +02:00
Sebastian Sdorra
473f3257a0 close branch issue-970 2018-04-05 18:44:42 +02:00
Sebastian Sdorra
3d401b93ea #970 added help text for enable httppostargs 2018-04-03 11:56:51 +02:00
Sebastian Sdorra
acebd0f25e #970 wrap requests only if http postargs is enabled 2018-04-03 11:14:05 +02:00
Sebastian Sdorra
8047d36028 #970 use iso-8859-1 for http post args instead of us-ascii 2018-04-03 11:00:16 +02:00
Sebastian Sdorra
b43e406b76 #970 initial support of mercurials httppostargs protocol 2018-03-30 11:20:22 +02:00
Sebastian Sdorra
a34acd8ed4 #970 added option to enable the experimental httppostargs protocol of mercurial 2018-03-29 22:14:28 +02:00
Sebastian Sdorra
8aaa67cd6a #970 inspect mercurial commands in order to detect write requests
The HgPermissionFilter will now inspect the used mercurial command, of all requests which are using a read method like GET, HEAD, OPTIONS or TRACE and tread every one as write request, expect:
- no command was specified with the request (this is required for the hgweb ui)
- the command in the query string was found in the list of read commands
- if query string contains the batch command, then all commands specified in X-HgArg headers must be in the list of read commands
This change is required, in order to fix CVE-2018-1000132 for SCM-Manager.
2018-03-29 20:26:56 +02:00
Sebastian Sdorra
3a9bc6828d use code blocks for request and response 2018-03-29 19:58:52 +02:00
Sebastian Sdorra
e7dd54c133 #970 added ngrep dumps for mercurial wire protocol and more realistic tests for isWriteRequest 2018-03-29 10:21:34 +02:00