Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id E9B83632CAA for ; Tue, 3 Feb 2009 12:16:48 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 89118-07 for ; Tue, 3 Feb 2009 12:16:45 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mirapoint7.brutele.be (mirapoint7.brutele.be [212.68.199.151]) by mail.postgresql.org (Postfix) with ESMTP id 6ED33632CA2 for ; Tue, 3 Feb 2009 12:16:45 -0400 (AST) Received: from abraham.pivert.org (user-85-201-95-140.static.tvcablenet.be [85.201.95.140] (may be forged)) by mirapoint7.brutele.be (MOS 3.10.3-GA) with ESMTP id KIJ43999; Tue, 3 Feb 2009 17:16:39 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by abraham.pivert.org (Postfix) with ESMTP id 918741DD4A for ; Tue, 3 Feb 2009 17:16:36 +0100 (CET) X-Virus-Scanned: amavisd-new at appart.pivert.org Received: from abraham.pivert.org ([127.0.0.1]) by localhost (mail.pivert.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KYlc-1xiLSLD for ; Tue, 3 Feb 2009 17:16:36 +0100 (CET) Received: from bart.localnet (unknown [192.168.232.34]) by abraham.pivert.org (Postfix) with ESMTP id 296761D25E for ; Tue, 3 Feb 2009 17:16:36 +0100 (CET) To: pgsql-php@postgresql.org Subject: Re: How to store files into the DB with PHP. (bytea ?) Content-Disposition: inline From: =?utf-8?q?Fran=C3=A7ois_Delpierre?= Date: Tue, 3 Feb 2009 17:16:44 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <200902031716.44453.pgsql@pivert.org> X-Junkmail-Status: score=10/50, host=mirapoint7.brutele.be X-Junkmail-SD-Raw: score=unknown, refid=str=0001.0A0B0202.49886DEB.02DE,ss=1,fgs=0, ip=85.201.95.140, so=2008-09-22 23:22:13, dmn=5.7.1/2008-09-02, mode=single engine X-Junkmail-IWF: false X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200902/7 X-Sequence-Number: 3983 Hi Andrew, > I don't see that this changes things. Whether you use stored > procedures, authenticate against the database, or whatever, your web > application layer has access to the information on the way through and > any compromise of your webserver will necessarily involve having a 'man > in the middle' possibility. You're right, authenticating against the DB will not change anything, my=20 mistake. As far as the user can read a table, he can read all records. > So an attacker would (e.g.) log the user's credentials as they pass > through and then happily generate their own tickets to use to extract > the data. Totally agree, the attacker will be able to access the files of the users t= hat=20 are connecting from the time he put the sniffer in place BUT NOT dump the w= hole=20 content with thousands of documents from the previous months from users tha= t=20 did not connect recently. So, this limit the impact. To go back to the initial subject of this post, I'm now able to store/read= =20 files from the DB up to 20MB without problem. Without using stored procedur= es=20 yet. (Maybe I can post the code here.) Only an annoying warning about escap= ing=20 that I can't figure out yet. =46ran=C3=A7ois.