Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bvBUq-0000op-AG for pgadmin-hackers@arkaria.postgresql.org; Fri, 14 Oct 2016 23:02:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bvBUp-00070l-TO for pgadmin-hackers@arkaria.postgresql.org; Fri, 14 Oct 2016 23:02:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bvBUc-0006mL-82 for pgadmin-hackers@postgresql.org; Fri, 14 Oct 2016 23:02:22 +0000 Received: from mail-it0-x236.google.com ([2607:f8b0:4001:c0b::236]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bvBUZ-0001Ck-1h for pgadmin-hackers@postgresql.org; Fri, 14 Oct 2016 23:02:21 +0000 Received: by mail-it0-x236.google.com with SMTP id 4so4222406itv.0 for ; Fri, 14 Oct 2016 16:02:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=yYHaslfqgowyziw3T5TN6fNS4Zt2RVexw9t1E/vJV1w=; b=O6hRh/zqv1ppc0W2a692eGa70iNI8IOE8pWiox68R8abh5N08EqL5hWJxwlZwxTlHq eEBcxpJfft/xDGRYcgWd50O8gT9FP/EcMMo9TvWK75fxlfn0zlwvIL1uFqym9SrtHczG p5nyldmiEym9Kqo4LEdPCIiBIyMWYVN4PVH7XCxP7Ez73s1/Kq09DhOZ+S0oZ2ozI3jX n1dV3tDnQ4V6XIsSN1IeUXkT3bb6+llqIg4AYetA2NFv/zES3/sXGmaFlNTmoVGCQtRU r9NG47UoDofQtJD4MXOL4ei7k6BGF1/18k7GJZq+KPa+7u0qp+UHELttvx3NnuRfN1R9 Yt0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=yYHaslfqgowyziw3T5TN6fNS4Zt2RVexw9t1E/vJV1w=; b=QwBcmC389q3oQt3MjgVcAvykIgAT7zzAsw9NXxJYFUJ4FckBPkIrF3ETZ96fSFp5gy zEfI9Gb+XyPxgRKYf/HF7T4wAX1gslYwHMDQ1ceuAXoE/46IBNR6O8l5B1ys40qMi0cA 5NlxnsLKZXSQ43N/1hAih6dMJJEI8UUXzTdqfwtaaO8RykmahrlbdEgDTGDxkm80tc1v YuB3Qh7RDJJNPF/feb6DAaZbhroq4LjXPUzTq732OfKBfVOq9Knx5T4qpX/n1rqtkl5V iLARH+YZ0WHfbS02l+DP6peUOoylD/MceylocF/b2/PHKaiWrBPXZwMgyvxyhIbHk7EA 22dw== X-Gm-Message-State: AA6/9Rl2AtnqSVTtZHxtMMx+OEsmExQPt/9iDgokkMDyDyHvSW3WvG7WvOs/ZpggXlvwgEVymQWEFE2Q4A0pyg== X-Received: by 10.36.202.131 with SMTP id k125mr509338itg.100.1476486137492; Fri, 14 Oct 2016 16:02:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.146.135 with HTTP; Fri, 14 Oct 2016 16:02:16 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Sat, 15 Oct 2016 00:02:16 +0100 Message-ID: Subject: Re: [pgAdmin4][Patch]: SYNONYM issue if use all special characters as name To: Surinder Kumar Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary=94eb2c089e5cbddbd8053edb3753 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --94eb2c089e5cbddbd8053edb3753 Content-Type: text/plain; charset=UTF-8 Thanks, patch applied. On Friday, October 14, 2016, Surinder Kumar wrote: > Hi > > *Issue:* > If synonym name contains special characters, the request url is be '404 > not found'. > i.e. It doesn't hit at 'sql' method of synonym. > > *Solution:* > If URL has an identifier containing slash character '/' into the URI, then > set param type to path. > like /. > Because if param name contains '/' in synonym name, it gets confused and > wrong route is formed. > Reference:- http://flask.pocoo.org/snippets/76/ > > Please find attached patch and review. > > Thanks, > Surinder Kumar > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --94eb2c089e5cbddbd8053edb3753 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks, patch applied.

On Friday, October 14, 2016, Surinder Kumar &= lt;surinder.kumar@enterp= risedb.com> wrote:
Hi

Issue:
If synonym name contains special c= haracters, the request url is be '404 not found'.
i.e. It doesn't hit at = 9;sql' method of synonym.

Solution:
If URL has an identifier contain= ing slash character '/' into the URI, then set param type to path.<= /div>
like /<path: int>.
Because if param name contains '/' in synonym na= me, it gets confused and wrong route is formed.

Please find attached= patch and review.

Thanks,
Surinder Kumar=


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @= pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL= Company

--94eb2c089e5cbddbd8053edb3753--