Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bv3Jq-0004f5-Nk for pgadmin-hackers@arkaria.postgresql.org; Fri, 14 Oct 2016 14:18:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bv3Jp-00025q-RU for pgadmin-hackers@arkaria.postgresql.org; Fri, 14 Oct 2016 14:18:41 +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 1bv3Jp-00025k-Ga for pgadmin-hackers@postgresql.org; Fri, 14 Oct 2016 14:18:41 +0000 Received: from mail-lf0-x233.google.com ([2a00:1450:4010:c07::233]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bv3Jm-0007mr-2b for pgadmin-hackers@postgresql.org; Fri, 14 Oct 2016 14:18:40 +0000 Received: by mail-lf0-x233.google.com with SMTP id l131so155515774lfl.2 for ; Fri, 14 Oct 2016 07:18:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=TYAyHjLZgfW1s8Bov2LGknegIYckN1gHYLUN3rk0rwM=; b=Rb8jGqoIOOnsm5tb9kiyT6SUhdJbhIa1+hc4FpucRPVIgUp6vbnMVR7nvcffVC1VIw 3Ry8ZUtpM/Lwlaa9YmWvVS5K6lHntciurW3N+86aYhyxnDccvR3prYdBjp2Tnxfhx6dz duyvmBToJ/z0hHxUrmVUlhf67wXR7og9rQDlMFV3RoTg7gWDn6sB572AFx5ozb/wYIeI 07wJA2NckQrNNal+U7eDFNG49aN/n5I4Wtov9Lzx94I9A+iMHaP9b+ixRbYvWR46Satm EegU/wZdYiHqkgTUXzWgBa6HOnf7sk6tSea9uQnkMlyRh3GFPmQBOykxZLAqNw7iXXdE 76Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=TYAyHjLZgfW1s8Bov2LGknegIYckN1gHYLUN3rk0rwM=; b=mRVWNRbgat2bdO5f2qTXVBPAYpu0yILIciPb5lSeiaD86pdQRZ2VQwn6zi67WY6E16 ZLb5hWlEcEiyrMJsVaBsbWoo0+poPQKAIynAJ3zROOYf2zzSTDWHilmZmCMvBCQmW/K5 aUgzJ7Twv2Vpy6rAVRri7wl1PWRt58x39hl8YQM6wjK7H8M+HXorJ+H5IvdyOoq+FmNZ seih24OdrWUsds54CBzjQej8tbUrrFc8pPpq/FJyctB38f3VDbGvE7gTDhup6yl3Movk PHgY/BmxFqOyRiIF6X4y5Z0/OeapKlGHaKEjm37qt5YHGNq7KaZF7Zt+93cDRMEvZTVo IQzA== X-Gm-Message-State: AA6/9RljY9nSgzawZzaCp7cQAmdHAzgb7LaATUyfEkNXU9AcFEuY/j2Hz1o053LQtVG5Z+yNf3znf+lk3NyIMQdb X-Received: by 10.194.147.48 with SMTP id th16mr2160901wjb.68.1476454717017; Fri, 14 Oct 2016 07:18:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.172.198 with HTTP; Fri, 14 Oct 2016 07:18:06 -0700 (PDT) From: Surinder Kumar Date: Fri, 14 Oct 2016 19:48:06 +0530 Message-ID: Subject: [pgAdmin4][Patch]: SYNONYM issue if use all special characters as name To: pgadmin-hackers Content-Type: multipart/mixed; boundary=089e012282b6ef8376053ed3e67b 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 --089e012282b6ef8376053ed3e67b Content-Type: multipart/alternative; boundary=089e012282b6ef8373053ed3e679 --089e012282b6ef8373053ed3e679 Content-Type: text/plain; charset=UTF-8 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 --089e012282b6ef8373053ed3e679 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi<= /div>

Issue:
If synonym name con= tains 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 ident= ifier containing slash character '/' into the URI, then set param t= ype to path.
like /<path: int>.
Because if param name contains '/' i= n synonym name, it gets confused and wrong route is formed.

Please find attached patch and re= view.

Thanks,
Surinder Kumar
--089e012282b6ef8373053ed3e679-- --089e012282b6ef8376053ed3e67b Content-Type: application/octet-stream; name="RM1622.patch" Content-Disposition: attachment; filename="RM1622.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_iu9uztuq0 ZGlmZiAtLWdpdCBhL3dlYi9wZ2FkbWluL2Jyb3dzZXIvc2VydmVyX2dyb3Vw cy9zZXJ2ZXJzL2RhdGFiYXNlcy9zY2hlbWFzL3N5bm9ueW1zL19faW5pdF9f LnB5IGIvd2ViL3BnYWRtaW4vYnJvd3Nlci9zZXJ2ZXJfZ3JvdXBzL3NlcnZl cnMvZGF0YWJhc2VzL3NjaGVtYXMvc3lub255bXMvX19pbml0X18ucHkKaW5k ZXggMDg3ZTI2ZS4uMmQzNmQyNyAxMDA2NDQKLS0tIGEvd2ViL3BnYWRtaW4v YnJvd3Nlci9zZXJ2ZXJfZ3JvdXBzL3NlcnZlcnMvZGF0YWJhc2VzL3NjaGVt YXMvc3lub255bXMvX19pbml0X18ucHkKKysrIGIvd2ViL3BnYWRtaW4vYnJv d3Nlci9zZXJ2ZXJfZ3JvdXBzL3NlcnZlcnMvZGF0YWJhc2VzL3NjaGVtYXMv c3lub255bXMvX19pbml0X18ucHkKQEAgLTE0OSw4ICsxNDksMTMgQEAgY2xh c3MgU3lub255bVZpZXcoUEdDaGlsZE5vZGVWaWV3KToKICAgICAgICAgeyd0 eXBlJzogJ2ludCcsICdpZCc6ICdkaWQnfSwKICAgICAgICAgeyd0eXBlJzog J2ludCcsICdpZCc6ICdzY2lkJ30KICAgICBdCisgICAgIyBJZiBVUkwgaGFz IGFuIGlkZW50aWZpZXIgY29udGFpbmluZyBzbGFzaCBjaGFyYWN0ZXIgJy8n CisgICAgIyBpbnRvIHRoZSBVUkksIHRoZW4gc2V0IHBhcmFtIHR5cGUgdG8g cGF0aC4gQmVjYXVzZSBpZgorICAgICMgcGFyYW0gbmFtZSBjb250YWlucyAn LycgaW4gc3lpZCwgaXQgZ2V0cyBjb25mdXNlZCBhbmQKKyAgICAjIHdyb25n IHVybCBpcyBnZW5lcmF0ZWQuCisgICAgIyBSZWZlcmVuY2U6LSBodHRwOi8v Zmxhc2sucG9jb28ub3JnL3NuaXBwZXRzLzc2LwogICAgIGlkcyA9IFsKLSAg ICAgICAgeyd0eXBlJzogJ3N0cmluZycsICdpZCc6ICdzeWlkJ30KKyAgICAg ICAgeyd0eXBlJzogJ3BhdGgnLCAnaWQnOiAnc3lpZCd9CiAgICAgXQogCiAg ICAgb3BlcmF0aW9ucyA9IGRpY3Qoewo= --089e012282b6ef8376053ed3e67b Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers --089e012282b6ef8376053ed3e67b--