Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fb1FV-0005oG-GU for pgadmin-hackers@arkaria.postgresql.org; Thu, 05 Jul 2018 10:12:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fb1FT-0007YH-N2 for pgadmin-hackers@arkaria.postgresql.org; Thu, 05 Jul 2018 10:12:27 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fb1FT-0007YA-3z for pgadmin-hackers@lists.postgresql.org; Thu, 05 Jul 2018 10:12:27 +0000 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fb1FL-0001Ce-ET for pgadmin-hackers@postgresql.org; Thu, 05 Jul 2018 10:12:25 +0000 Received: by mail-wm0-x232.google.com with SMTP id s12-v6so10186881wmc.1 for ; Thu, 05 Jul 2018 03:12:19 -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=sI3T8O7pm0EtYX17r2je7tpUq2FPRIViFHJ3ULlU/Dk=; b=hEoAeXwTgsXELwV2SxIVrAtjoQ8P7BeprcGa1RFFrR89G1bo0SozpA+CPH4+lV9iEG er4GxmEs6eYTvGm4aWVeQ5eVNPEcODW7wxFMbVsBQkaxmUyhp3KLC/ROzUs4DKWTmqg5 4z6wb1hd9B5EX6+2PxwpxFJiY2MvqDa5eFQErP20u0qL5r4V9Jr7mpHCCdCqrrBg808c TFzERwBacuQm/wAbRNSgManInxKjZBhizm2X3nkPWBWcO+xwheAwi68ZI3dzz45V2s6T jsd4pOo6oP+XH4fAbRgVDEmi7t4R5u6eln8w/OKVHNHwVQrQelG3gW5xeTSDHOC2h3XM IqJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=sI3T8O7pm0EtYX17r2je7tpUq2FPRIViFHJ3ULlU/Dk=; b=KIFGKh5MAUR7ts+7EFYxnpcM1AA4e+LLlzzT+1VuxZbNpevQ2MVDWzW59Ou/wIQg1E YjMRDTMlXI0D1ykgV+mk3gxk9nVnyI68K2E6ALXOWUc0z9jrUFHEF60wcVEFmy1nDSkU 4X83bi0IL2sXVUuHwZZ53Z+JZcD3PQ2HZstYWl7+7/azwcRneij0rVtpUQNf0z3kfXy1 W7wdWVNVAxRshSqkWRXXqeXA3W9zh4xEjO1tuPRUcY7nd2pUsByp+5sxsbqUwJ1Jkl8i JgWQkQvyPOTIwFlpkokx2QvIvLcaKVFJhsZOwuQJXLfoq39MHbr9V23CJin+rZaV5z4h nzKg== X-Gm-Message-State: APt69E0gVW+qlLZwwOPVhAsyfVp+xN/7aD9BegU8DzbcuhqxGhJZwnV4 HMwi3/Ts73mmST6EmFc8fMufO0uNna8c3tCU8odKKA== X-Google-Smtp-Source: AAOMgpf+/pnlzQE+80MSE4dBML6mKcZ+Yd+iib/dwVlYoFCetYpPOSlnWEjZOsX3Klluvh/BDQpXBUKhUodUebymv48= X-Received: by 2002:adf:f086:: with SMTP id n6-v6mr4343624wro.49.1530785536782; Thu, 05 Jul 2018 03:12:16 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1c:8955:0:0:0:0:0 with HTTP; Thu, 5 Jul 2018 03:12:16 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Thu, 5 Jul 2018 11:12:16 +0100 Message-ID: Subject: Re: [pgAdmin4][RM3371] Ping endpoint still send a pg4a_session cookie To: Aditya Toshniwal Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="00000000000025c8c005703dc8cc" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --00000000000025c8c005703dc8cc Content-Type: text/plain; charset="UTF-8" Thanks, patch applied. On Wed, Jul 4, 2018 at 6:38 AM, Aditya Toshniwal < aditya.toshniwal@enterprisedb.com> wrote: > Hi Dave, > > I tested with apache2 and it works fine. Below is the log: > > adityatoshniwal@ubuntu:~/.pgadmin/sessions$ ls -ltr > total 0 > adityatoshniwal@ubuntu:~/.pgadmin/sessions$ curl -vvv " > http://pgadmin.local/pgadmin/misc/ping" > * Trying 127.0.0.1... > * Connected to pgadmin.local (127.0.0.1) port 80 (#0) > > GET /pgadmin/misc/ping HTTP/1.1 > > Host: pgadmin.local > > User-Agent: curl/7.47.0 > > Accept: */* > > > < HTTP/1.1 200 OK > < Date: Wed, 04 Jul 2018 05:36:37 GMT > < Server: Apache/2.4.18 (Ubuntu) > < Set-Cookie: pga4_session=d9ec42c2-7a9d-4e7a-abae-e510a7bee94e!7GpTdrxChvZaPCud1IZS4BdqwgU=; > Expires=Thu, 05-Jul-2018 11:06:37 GMT; HttpOnly; Path=/ > < Content-Length: 4 > < Content-Type: text/html; charset=utf-8 > < > * Connection #0 to host pgadmin.local left intact > PINGadityatoshniwal@ubuntu:~/.pgadmin/sessions$ ls -ltr > total 0 > adityatoshniwal@ubuntu:~/.pgadmin/sessions$ > > > On Mon, Jul 2, 2018 at 8:29 PM, Dave Page wrote: > >> Hi >> >> I'm not in a position to test at the moment, but can you confirm this >> will work if the root of pgAdmin is at (for example) /pgadmin? So the >> actual root is /pgadmin/misc/ping ? >> >> On Mon, Jul 2, 2018 at 1:35 PM, Aditya Toshniwal < >> aditya.toshniwal@enterprisedb.com> wrote: >> >>> Hi Hackers, >>> >>> Attached is the patch for fixing RM3371 where /misc/ping service >>> generate session file for each call and so cannot be used frequently. >>> The patch is to skip session file generation and session caching for the >>> URLs provided in SESSION_SKIP_PATH list config parameter. >>> pg4a_session_cookie value will still be generated but nothing will be >>> stored at the backend. >>> Also, I have separated the garbage collection code in current ping >>> service to a new url /misc/cleanup. /misc/ping will be purely for is alive >>> check. >>> >>> Request you to kindly review. >>> >>> -- >>> Thanks and Regards, >>> Aditya Toshniwal >>> Software Engineer | EnterpriseDB Software Solutions | Pune >>> "Don't Complain about Heat, Plant a tree" >>> >> >> >> >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> > > > > -- > Thanks and Regards, > Aditya Toshniwal > Software Engineer | EnterpriseDB Software Solutions | Pune > "Don't Complain about Heat, Plant a tree" > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --00000000000025c8c005703dc8cc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, patch applied.
On Wed, Jul 4, 2018 at 6:38 AM, Aditya Toshniwa= l <aditya.toshniwal@enterprisedb.com> wrote:=
Hi Dave,

I tested with = apache2 and it works fine. Below is the log:

adityatoshniwal@ubuntu:~/.pgadmin/sessions$ ls = -ltr
total 0
adityatoshniwal@ubuntu:~/.pgadmin/sessions$ curl -v= vv "http://pgadmin.local/pgadmin/misc/ping"
*=C2=A0=C2=A0 T= rying 127.0.0.1...
* Connected to pgadmin.local (127.0.0.1) port 80 (#0)=
> GET /pgadmin/misc/ping HTTP/1.1
> Host: pgadmin.local
>= ; User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 200= OK
< Date: Wed, 04 Jul 2018 05:36:37 GMT
< Server: Apache/2.4.= 18 (Ubuntu)
< Set-Cookie: pga4_session=3Dd9ec42c2-7a9d-4e7a-abae= -e510a7bee94e!7GpTdrxChvZaPCud1IZS4BdqwgU=3D; Expires=3DThu, 05-Jul-20= 18 11:06:37 GMT; HttpOnly; Path=3D/
< Content-Length: 4
< Conte= nt-Type: text/html; charset=3Dutf-8
<
* Connection #0 to host pga= dmin.local left intact
PINGadityatoshniwal@ubuntu:~/.pgadmin/sessio= ns$ ls -ltr
total 0
adityatoshniwal@ubuntu:~/.pgadmin/sessions$ =



On Mon, Jul 2, 2018 at 8:= 29 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

I'm not in a p= osition to test at the moment, but can you confirm this will work if the ro= ot of pgAdmin is at (for example) /pgadmin? So the actual root is /pgadmin/= misc/ping ?

On Mon, Jul 2, 2018 at 1:= 35 PM, Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
H= i Hackers,

Attached is the patch for fixing RM3371 where /misc/ping se= rvice generate session file for each call and so cannot be used frequently.=
The patch is to skip session file generation and session caching for the U= RLs provided in SESSION_SKIP_PATH list config parameter. pg4a_session_cooki= e value will still be generated but nothing will be stored at the backend.<= /div>
= Also, I have separated the garbage collection code in current ping service = to a new url /misc/cleanup. /misc/ping will be purely for is alive check.
<= br>
Request you to kindly review.

--
<= div>
Thanks and Regards,
Aditya Toshniwal
Software Engineer |=C2=A0EnterpriseDB Software Sol= utions |=C2=A0Pune
"Don't Complain about Heat, Plant a tr= ee"



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

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



--
Thanks and Regards,
Aditya Toshniwal
Software Engineer |=C2=A0EnterpriseDB Soft= ware Solutions |=C2=A0Pune
=
"Don't Complain about Heat, Pl= ant a tree"



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

EnterpriseDB UK: http://www.enterprised= b.com
The Enterprise PostgreSQL Company
--00000000000025c8c005703dc8cc--