Patchwork [2,of,2] revset: add 'only' to DoS-safe symbols

login
register
mail settings
Submitter Yuya Nishihara
Date Dec. 3, 2014, 2:37 p.m.
Message ID <e6dcb2a7f20fd5d803ef.1417617446@mimosa>
Download mbox | patch
Permalink /patch/6976/
State Accepted
Commit c237499a7fba65c88a2da721a22b66df4f39cf4e
Headers show

Comments

Yuya Nishihara - Dec. 3, 2014, 2:37 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1417615002 -32400
#      Wed Dec 03 22:56:42 2014 +0900
# Node ID e6dcb2a7f20fd5d803efad7eb8040a21e42c8b16
# Parent  4ede62983fac23ed1a23845b1a62483da3a5fcf0
revset: add 'only' to DoS-safe symbols

There is no reason to disable it in hgweb because the same query can be
written without using 'only()'.
Matt Mackall - Dec. 4, 2014, 1:38 a.m.
On Wed, 2014-12-03 at 23:37 +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1417615002 -32400
> #      Wed Dec 03 22:56:42 2014 +0900
> # Node ID e6dcb2a7f20fd5d803efad7eb8040a21e42c8b16
> # Parent  4ede62983fac23ed1a23845b1a62483da3a5fcf0
> revset: add 'only' to DoS-safe symbols

These are queued for default, thanks.

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -1798,6 +1798,7 @@  safesymbols = set([
     "min",
     "modifies",
     "obsolete",
+    "only",
     "origin",
     "outgoing",
     "p1",