This queue is for tickets about the DBI CPAN distribution.

Report information
The Basics
Id:
99508
Status:
open
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
MITHALDU [...] cpan.org
Cc:
CARNIL [...] cpan.org
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
1.632



Subject: Tables will erroneously be opened in current folder if f_dir set to a relative path that does not exist
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Message-ID: <rt-4.0.18-26810-1413385133-452.0-0-0@rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 1224
Ticketing this as per Tux' request. I'll describe it as a series of shell commands. Of these, the first two behaviors are misbehavior and only the last case is correct. In the first case it should not search in '.', but ONLY in 'test', and raise the error accordingly. In the second case it should not search in '.' and use the file 'yy.csv' found there. Instead it should search only in 'test' and disregard files found elsewhere. $ cd /tmp $ perl -MDBI -MDP -wE'$a=DBI->connect("dbi:CSV:f_dir=./test;f_ext=.csv/r",undef,undef,{RaiseError=>1});$b=$a->prepare("select distinct foo from yy");$b->execute;DDumper$b->fetch' ... Cannot open /tmp/yy.csv: No such file or directory (2) at /pro/lib/perl5/site_perl/5.20.0/x86_64-linux-thread-multi-ld/DBI/DBD/SqlEngine.pm line 1589. $ echo [useful content] > yy.csv $ perl -MDBI -MDP -wE'$a=DBI->connect("dbi:CSV:f_dir=./test;f_ext=.csv/r",undef,undef,{RaiseError=>1});$b=$a->prepare("select distinct foo from yy");$b->execute;DDumper$b->fetch' [ 1 ] $ mkdir test $ mv yy.csv test/ $ perl -MDBI -MDP -wE'$a=DBI->connect("dbi:CSV:f_dir=./test;f_ext=.csv/r",undef,undef,{RaiseError=>1});$b=$a->prepare("select distinct foo from yy");$b->execute;DDumper$b->fetch' [ 1 ]
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-26810-1413385133-452.0-0-0@rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-26810-1413385133-452.0-0-0@rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-20969-1413385941-1838.99508-0-0@rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 294
Even with an absolute path it misbehaves: $ rm -rf test $ perl -MDBI -MData::Dumper -wE'$a=DBI->connect("dbi:CSV:f_dir=/tmp/test/;f_ext=.csv/r",undef,undef,{RaiseError=>1});$b=$a->prepare("select distinct foo from yy");$b->execute;' ... Cannot open /tmp/yy.csv: No such file or directory (2)
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-26810-1413385133-452.0-0-0@rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-26810-1413385133-452.0-0-0@rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-11846-1599743284-660.99508-0-0@rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 5313
Dne St 15.říj.2014 10:58:53, MITHALDU napsal(a):
Show quoted text
> Ticketing this as per Tux' request. I'll describe it as a series of > shell commands. Of these, the first two behaviors are misbehavior and > only the last case is correct. > > In the first case it should not search in '.', but ONLY in 'test', and > raise the error accordingly. > > In the second case it should not search in '.' and use the file > 'yy.csv' found there. Instead it should search only in 'test' and > disregard files found elsewhere. > > $ cd /tmp > > $ perl -MDBI -MDP -wE'$a=DBI-
> >connect("dbi:CSV:f_dir=./test;f_ext=.csv/r",undef,undef,{RaiseError=>1});$b=$a- > >prepare("select distinct foo from yy");$b->execute;DDumper$b->fetch'
> > ... Cannot open /tmp/yy.csv: No such file or directory (2) at > /pro/lib/perl5/site_perl/5.20.0/x86_64-linux-thread-multi- > ld/DBI/DBD/SqlEngine.pm line 1589. > > $ echo [useful content] > yy.csv > > $ perl -MDBI -MDP -wE'$a=DBI-
> >connect("dbi:CSV:f_dir=./test;f_ext=.csv/r",undef,undef,{RaiseError=>1});$b=$a- > >prepare("select distinct foo from yy");$b->execute;DDumper$b->fetch'
> > [ 1 ] > > $ mkdir test > > $ mv yy.csv test/ > > $ perl -MDBI -MDP -wE'$a=DBI-
> >connect("dbi:CSV:f_dir=./test;f_ext=.csv/r",undef,undef,{RaiseError=>1});$b=$a- > >prepare("select distinct foo from yy");$b->execute;DDumper$b->fetch'
> > [ 1 ]
Is this fixed? Changes for DBI-1.632 mention it is fixed, but I can still see the bad behavior with DBI-1.643 and DBD-CSV-0.55: $ touch yy.csv [test@fedora-34 tmp]$ perl -MDBI -wE 'DBI->connect("dbi:CSV:f_dir=./test;f_ext=.csv/r",undef,undef,{RaiseError=>1})->prepare("select distinct foo from yy")->execute;' DBD::CSV::st execute failed: Execution ERROR: Missing first row due to EOF - End of data in parsing input stream at /usr/lib64/perl5/vendor_perl/DBI/DBD/SqlEngine.pm line 1480. . [...] It opens ./yy.cvs instead of ./test/yy.csv. It should report an error because there is no ./test directory: $ strace -e file -- perl -MDBI -wE 'DBI->connect("dbi:CSV:f_dir=./test;f_ext=.csv/r",undef,undef,{RaiseError=>1})->prepare("select distinct foo from yy")->execute; [...] openat(AT_FDCWD, "/usr/share/perl5/File/Basename.pm", O_RDONLY|O_CLOEXEC) = 3 getcwd("/tmp", 4096) = 5 stat("./test", 0x55cae9b864b8) = -1 ENOENT (No such file or directory) stat("/usr/local/lib64/perl5/5.32/SQL/Dialects/AnyData.pmc", 0x7ffd83035c80) = -1 ENOENT (No such file or directory) stat("/usr/local/lib64/perl5/5.32/SQL/Dialects/AnyData.pm", 0x7ffd83035c80) = -1 ENOENT (No such file or directory) stat("/usr/local/share/perl5/5.32/SQL/Dialects/AnyData.pmc", 0x7ffd83035c80) = -1 ENOENT (No such file or directory) stat("/usr/local/share/perl5/5.32/SQL/Dialects/AnyData.pm", 0x7ffd83035c80) = -1 ENOENT (No such file or directory) stat("/usr/lib64/perl5/vendor_perl/SQL/Dialects/AnyData.pmc", 0x7ffd83035c80) = -1 ENOENT (No such file or directory) stat("/usr/lib64/perl5/vendor_perl/SQL/Dialects/AnyData.pm", 0x7ffd83035c80) = -1 ENOENT (No such file or directory) stat("/usr/share/perl5/vendor_perl/SQL/Dialects/AnyData.pmc", 0x7ffd83035c80) = -1 ENOENT (No such file or directory) stat("/usr/share/perl5/vendor_perl/SQL/Dialects/AnyData.pm", {st_mode=S_IFREG|0644, st_size=2092, ...}) = 0 openat(AT_FDCWD, "/usr/share/perl5/vendor_perl/SQL/Dialects/AnyData.pm", O_RDONLY|O_CLOEXEC) = 3 stat("/usr/local/lib64/perl5/5.32/SQL/Dialects/Role.pmc", 0x7ffd83035580) = -1 ENOENT (No such file or directory) stat("/usr/local/lib64/perl5/5.32/SQL/Dialects/Role.pm", 0x7ffd83035580) = -1 ENOENT (No such file or directory) stat("/usr/local/share/perl5/5.32/SQL/Dialects/Role.pmc", 0x7ffd83035580) = -1 ENOENT (No such file or directory) stat("/usr/local/share/perl5/5.32/SQL/Dialects/Role.pm", 0x7ffd83035580) = -1 ENOENT (No such file or directory) stat("/usr/lib64/perl5/vendor_perl/SQL/Dialects/Role.pmc", 0x7ffd83035580) = -1 ENOENT (No such file or directory) stat("/usr/lib64/perl5/vendor_perl/SQL/Dialects/Role.pm", 0x7ffd83035580) = -1 ENOENT (No such file or directory) stat("/usr/share/perl5/vendor_perl/SQL/Dialects/Role.pmc", 0x7ffd83035580) = -1 ENOENT (No such file or directory) stat("/usr/share/perl5/vendor_perl/SQL/Dialects/Role.pm", {st_mode=S_IFREG|0644, st_size=2560, ...}) = 0 openat(AT_FDCWD, "/usr/share/perl5/vendor_perl/SQL/Dialects/Role.pm", O_RDONLY|O_CLOEXEC) = 4 lstat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=220, ...}) = 0 stat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=220, ...}) = 0 openat(AT_FDCWD, "/tmp", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3 openat(AT_FDCWD, "/tmp/yy.csv", O_RDONLY|O_CLOEXEC) = 3 DBD::CSV::st execute failed: Execution ERROR: Missing first row due to EOF - End of data in parsing input stream at /usr/lib64/perl5/vendor_perl/DBI/DBD/SqlEngine.pm line 1480. . [...] But when I create the missing directory: $ mkdir test [test@fedora-34 tmp]$ perl -MDBI -wE 'DBI->connect("dbi:CSV:f_dir=./test;f_ext=.csv/r",undef,undef,{RaiseError=>1})->prepare("select distinct foo from yy")->execute;' DBD::CSV::st execute failed: Execution ERROR: Cannot open /tmp/test/yy.csv: No such file or directory (2) at /usr/lib64/perl5/vendor_perl/DBI/DBD/SqlEngine.pm line 1624. It behaves correctly. Is looks like it falls back to a current directory, if the f_dir directory does not exist.
MIME-Version: 1.0
X-Spam-Status: No, score=-1.898 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
X-Cpan.org: This message routed through the cpan.org mail forwarding service. Please use PAUSE pause.perl.org to configure your delivery settings.
X-Spam-Flag: NO
X-RT-Interface: API
Content-Language: en-US
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Virus-Scanned: Debian amavisd-new at mail.beuc.net
Message-ID: <dd72f8af-0734-f01a-a7bc-5e27a5ca57ac@beuc.net>
content-type: text/plain; charset="utf-8"
Autocrypt: addr=beuc@beuc.net; prefer-encrypt=mutual; keydata= mQINBF4bZs4BEADdg+m6olW3LnThg5Xoh1kjy0b8hhQzX/UV0d9OVK8FhEITSPXW8qvnEvap O1LOq07Lo5vZ7TQs053XTt9ZqOP1aR9NQcg0kaakOxIhuvxplDGvsozr3Zq0oTmx5I5VDnZA cKoinKohWUrkzvCEC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IanqZzPJrTssUrfHnSrm0AiEPAjtK/Zu7U7f3LSSQ7VGZLt/SlJIT0b7pMURjvNi 4j6Hj4uqlgo0GO3dDkQtqg/9GSD4jdHlTU/iFQ+TXMIiE3fkIL2LMXUGpcZz2AuiijWd+1Mf THrE1k1mqF+xo/4Q19wDTdHXH7r1GUscPt4F7aX4QJ02bkOud46Bt05xnTGC4ljSWm4is8T0 p9iNQS4C7CSkO44tvK60aPpfQmGzX0eWHD1cmu996a9WMPW+Nu1KBBmhsNYEqteXssxzoMIS +EZtiQ82DeoADTgt+h81w48+CwVqySKZsq+AzPPUXtcYK7zAO4rCkkxFbeyT7mK6/4+DLQtY v5DeSKWU9dka417cj159kh3uzSy0If2jgZ75IX6EmZ2pzhzHfmHW1z6HEdTAG1KJSAiW+5X1 54FoAtC5QykPGpNnuia8PgU1gXgHEeyGLVVcpXbnP6rpRTnDUyDoKMF0Z3CLv0bjXvpyPgMy QKZwWxOGPZWjqfCdHXg8fMPnKEMAjL6Y9NoJRdsDOUZvEEFD/SJJcjvria51qByu7pNq08e4 WyG3NPHSJFi//IPWDnobxThlV28e2sfH7+na7FqGQBY0V+InF284FQ7UC9DVPFkB8Rxq+KgG e64oO1w3QJb7jQnQmuDLhGoy+zJevmTlsb3S9migZSjT7Fucf7eX0m2CZ5i0AFTFz0OtbyY4 qSzmLHyMZrxiQh3lirfEUPTmSvs/eRjFcqxZrCwU6E4hI00xkf9CF2LeJf4=
X-RT-Original-Encoding: utf-8
X-Spam-Score: -1.898
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 4040024026D for <cpan-bug+dbi@hipster.bestpractical.com>; Tue, 15 Sep 2020 12:53:07 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nlOJoRGaL7rI for <cpan-bug+dbi@hipster.bestpractical.com>; Tue, 15 Sep 2020 12:53:05 -0400 (EDT)
Received: from xx1.develooper.com (xx1.develooper.com [147.75.38.233]) by hipster.bestpractical.com (Postfix) with ESMTPS id 4657C240045 for <bug-dbi@rt.cpan.org>; Tue, 15 Sep 2020 12:53:05 -0400 (EDT)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id CBF9B7C1C6 for <bug-dbi@rt.cpan.org>; Tue, 15 Sep 2020 09:53:04 -0700 (PDT)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id E31EC7CF3A for <bug-dbi@rt.cpan.org>; Tue, 15 Sep 2020 09:53:00 -0700 (PDT)
Received: from mail.beuc.net (mail.beuc.net [163.172.36.68]) by xx1.develooper.com (Postfix) with ESMTP id 372AD7C1C6 for <bug-dbi@rt.cpan.org>; Tue, 15 Sep 2020 09:52:59 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by mail.beuc.net (Postfix) with ESMTP id 56061633D6 for <bug-dbi@rt.cpan.org>; Tue, 15 Sep 2020 16:47:27 +0000 (UTC)
Received: from mail.beuc.net ([127.0.0.1]) by localhost (mail.beuc.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0LrlkVJnofgS for <bug-dbi@rt.cpan.org>; Tue, 15 Sep 2020 16:47:26 +0000 (UTC)
Delivered-To: cpan-bug+dbi@hipster.bestpractical.com
Subject: [rt.cpan.org #99508] DBI: Tables will erroneously be opened in current folder if f_dir set to a relative path that does not exist
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0
Return-Path: <beuc@beuc.net>
X-Original-To: cpan-bug+dbi@hipster.bestpractical.com
X-RT-Mail-Extension: dbi
Date: Tue, 15 Sep 2020 18:47:25 +0200
X-PMX-Perl: Suspicious Attachment
X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1000_LESS 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, BODY_SIZE_700_799 0, SINGLE_URI_IN_BODY 0, SPF_NONE 0, URI_WITH_PATH_ONLY 0, __ANY_URI 0, __BODY_NO_MAILTO 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __HAS_FROM 0, __HAS_MSGID 0, __HTTPS_URI 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __MOZILLA_USER_AGENT 0, __MSGID_DOMAIN_NOT_IN_HDRS 0, __NO_HTML_TAG_RAW 0, __SANE_MSGID 0, __SINGLE_URI_TEXT 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_IN_BODY 0, __URI_NOT_IMG 0, __URI_NO_MAILTO 0, __URI_NO_WWW 0, __URI_NS , __URI_WITH_PATH 0, __USER_AGENT 0, __zen.spamhaus.org_ERROR '
X-Spam-Level:
X-Greylist: delayed 330 seconds by postgrey-1.34 at xx1.develooper.com; Tue, 15 Sep 2020 09:53:00 PDT
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2019.11.28.70017
To: bug-dbi@rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Sylvain Beucler <beuc@beuc.net>
RT-Message-ID: <rt-4.0.18-28744-1600188788-1146.99508-0-0@rt.cpan.org>
Content-Length: 769
Hi, I confirm that the original poster's reproducer still behaves the same with and without the fix [1]. In DBD::File:connect(), it looks like parse_dns() is used incorrectly because it's given $dbname which is not a valid DSN (doesn't start with dbi:xxx), hence the parameters are not parsed/returned, and not validated by the first test. The f_dir parameter isn't present in $attr either, in the second test (I believe this is only the case when f_dir is passed as an explicit parameter rather than through the DSN). The test case passes f_dir as an explicit parameter. We probably lack a test variant with f_dir passed within the DSN. [1] https://github.com/perl5-dbi/dbi/commit/caedc0d7d602f5b2ae5efc1b00f39efeafb7b05a Cheers! Sylvain Beucler Debian LTS Team
MIME-Version: 1.0
X-Spam-Status: No, score=-1.898 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
In-Reply-To: <dd72f8af-0734-f01a-a7bc-5e27a5ca57ac@beuc.net>
Content-Disposition: inline
X-Cpan.org: This message routed through the cpan.org mail forwarding service. Please use PAUSE pause.perl.org to configure your delivery settings.
X-Spam-Flag: NO
X-RT-Interface: API
References: <dd72f8af-0734-f01a-a7bc-5e27a5ca57ac@beuc.net>
X-Operating-System: GNU/Linux
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Virus-Scanned: Debian amavisd-new at mail.beuc.net
Message-ID: <20200915173848.ftueszqowk44gkr7@mail.beuc.net>
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -1.898
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 371812403BF for <cpan-bug+dbi@hipster.bestpractical.com>; Tue, 15 Sep 2020 13:38:55 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IlFxMnozksXv for <cpan-bug+dbi@hipster.bestpractical.com>; Tue, 15 Sep 2020 13:38:53 -0400 (EDT)
Received: from xx1.develooper.com (xx1.develooper.com [147.75.38.233]) by hipster.bestpractical.com (Postfix) with ESMTPS id CCB6F240045 for <bug-dbi@rt.cpan.org>; Tue, 15 Sep 2020 13:38:53 -0400 (EDT)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id 73F207C1B0 for <bug-dbi@rt.cpan.org>; Tue, 15 Sep 2020 10:38:53 -0700 (PDT)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id 3172A7CF39 for <bug-dbi@rt.cpan.org>; Tue, 15 Sep 2020 10:38:52 -0700 (PDT)
Received: from mail.beuc.net (mail.beuc.net [163.172.36.68]) by xx1.develooper.com (Postfix) with ESMTP id C448D7C1B0 for <bug-dbi@rt.cpan.org>; Tue, 15 Sep 2020 10:38:51 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by mail.beuc.net (Postfix) with ESMTP id 0ACA9633E5 for <bug-dbi@rt.cpan.org>; Tue, 15 Sep 2020 17:38:50 +0000 (UTC)
Received: from mail.beuc.net ([127.0.0.1]) by localhost (mail.beuc.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cAMp9LWDuCpc for <bug-dbi@rt.cpan.org>; Tue, 15 Sep 2020 17:38:48 +0000 (UTC)
Received: by mail.beuc.net (Postfix, from userid 1000) id 9E8C86342B; Tue, 15 Sep 2020 17:38:48 +0000 (UTC)
Delivered-To: cpan-bug+dbi@hipster.bestpractical.com
Subject: Re: [rt.cpan.org #99508] DBI: Tables will erroneously be opened in current folder if f_dir set to a relative path that does not exist
User-Agent: NeoMutt/20170113 (1.7.2)
Return-Path: <beuc@beuc.net>
X-Original-To: cpan-bug+dbi@hipster.bestpractical.com
X-RT-Mail-Extension: dbi
Date: Tue, 15 Sep 2020 19:38:48 +0200
X-PMX-Perl: Suspicious Attachment
X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1000_LESS 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_600_699 0, BODY_SIZE_7000_LESS 0, IN_REP_TO 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, NO_CTA_FOUND 0, NO_URI_HTTPS 0, REFERENCES 0, SPF_NONE 0, __ANY_URI 0, __BODY_NO_MAILTO 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CD 0, __CT 0, __CT_TEXT_PLAIN 0, __DQ_NEG_HEUR 0, __DQ_NEG_IP 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_REFERENCES 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __NO_HTML_TAG_RAW 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __SUBJ_ALPHA_NEGATE 0, __SUBJ_REPLY 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_MAILTO 0, __URI_NO_WWW 0, __URI_NS , __USER_AGENT 0, __zen.spamhaus.org_ERROR '
X-Spam-Level:
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2019.11.28.70017
To: bug-dbi@rt.cpan.org
From: Sylvain Beucler <beuc@beuc.net>
RT-Message-ID: <rt-4.0.18-32753-1600191535-1590.99508-0-0@rt.cpan.org>
Content-Length: 610
More clearly put: f_dir is only validated through the parameters vector, not through the DSN vector. # ls yy.csv # perl -MDBI -MDP -wE'$a=DBI->connect("dbi:CSV:f_dir=./test;f_ext=.csv/r",undef,undef,{RaiseError=>1});$b=$a->prepare("select distinct foo from yy");$b->execute;DDumper$b->fetch' [ 1 ] # perl -MDBI -MDP -wE'$a=DBI->connect("dbi:CSV:f_ext=.csv/r",undef,undef,{f_dir=>"./test",RaiseError=>1});$b=$a->prepare("select distinct foo from yy");$b->execute;DDumper$b->fetch' No such directory './test at /usr/lib/x86_64-linux-gnu/perl5/5.20/DBI.pm line 671. Cheers! Sylvain Beucler Debian LTS Team
MIME-Version: 1.0
X-Spam-Status: No, score=-6.098 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_OUR_RT=-4, SPF_FAIL=0.001, SPF_HELO_NONE=0.001] autolearn=ham autolearn_force=no
In-Reply-To: <rt-4.0.18-32753-1600191535-364.99508-5-0@rt.cpan.org>
X-Cpan.org: This message routed through the cpan.org mail forwarding service. Please use PAUSE pause.perl.org to configure your delivery settings.
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-99508@rt.cpan.org> <dd72f8af-0734-f01a-a7bc-5e27a5ca57ac@beuc.net> <20200915173848.ftueszqowk44gkr7@mail.beuc.net> <rt-4.0.18-32753-1600191535-364.99508-5-0@rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <20200915210855.5cfa2314@pc09.procura.nl>
Content-Type: multipart/signed; boundary="Sig_/EU3ZaiUwgI5GPexKwkC/FGg"; micalg="pgp-sha256"; protocol="application/pgp-signature"
X-Spam-Score: -6.098
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i=@freedom.nl
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 6D4AD24026D for <cpan-bug+DBI@hipster.bestpractical.com>; Tue, 15 Sep 2020 15:14:55 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jdi8rui+OlBA for <cpan-bug+DBI@hipster.bestpractical.com>; Tue, 15 Sep 2020 15:14:51 -0400 (EDT)
Received: from xx1.develooper.com (xx1.develooper.com [147.75.38.233]) by hipster.bestpractical.com (Postfix) with ESMTPS id 78E6A240045 for <bug-DBI@rt.cpan.org>; Tue, 15 Sep 2020 15:14:51 -0400 (EDT)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id 01B187CEED for <bug-DBI@rt.cpan.org>; Tue, 15 Sep 2020 12:14:51 -0700 (PDT)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id 95AB97CF29 for <bug-DBI@rt.cpan.org>; Tue, 15 Sep 2020 12:14:47 -0700 (PDT)
Received: from outbound.soverin.net (outbound.soverin.net [116.202.65.215]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by xx1.develooper.com (Postfix) with ESMTPS id A8C957CEED for <bug-DBI@rt.cpan.org>; Tue, 15 Sep 2020 12:14:46 -0700 (PDT)
Received: from smtp.freedom.nl (unknown [10.10.3.36]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id D11B26086D for <bug-DBI@rt.cpan.org>; Tue, 15 Sep 2020 19:09:12 +0000 (UTC)
Received: from smtp.freedom.nl (smtp.freedom.nl [116.202.65.211]) by soverin.net
Delivered-To: cpan-bug+DBI@hipster.bestpractical.com
Subject: Re: [rt.cpan.org #99508] DBI: Tables will erroneously be opened in current folder if f_dir set to a relative path that does not exist
Return-Path: <tux@freedom.nl>
Dkim-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freedom.nl; s=default; t=1600196952; bh=J5vFLkHFWLw/x9ymMeIE/tPEVr2BjDy/aEdtC3DziS4=; h=Date:From:To:Subject:In-Reply-To:References:From; b=UTXzfeb9aQ9zhkMSvaVRQgU9JtY4zPCLy6Ka8+oDG2STCEtV94Wk/YLM0hbbF7jhc 54nvMWS6wbV3wNGzLneKJl/n3633KtbYi20PtCgMTzGr8f6ciWJu2V4aSTgKeZYqr9 RsEvwlfYtF6nyAZhCYLYlCtSv6qA6sKmFjl0020o=
X-Original-To: cpan-bug+DBI@hipster.bestpractical.com
X-RT-Mail-Extension: dbi
Date: Tue, 15 Sep 2020 21:08:55 +0200
X-PMX-Perl: Suspicious Attachment
X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DKIM_ALIGNS 0, DKIM_SIGNATURE 0, IN_REP_TO 0, KNOWN_MTA_TFX 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, REFERENCES 0, SPF_PASS 0, SXL_IP_TFX_WM 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __ATTACHMENT_SIZE_0_10K 0, __BODY_NO_MAILTO 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __DKIM_ALIGNS_1 0, __DKIM_ALIGNS_2 0, __DQ_NEG_HEUR 0, __DQ_NEG_IP 0, __FORWARDED_MSG 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __HAS_ATTACHMENT 0, __HAS_ATTACHMENT2 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_REFERENCES 0, __HTTPS_URI 0, __IN_REP_TO 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_TEXT_P2 0, __MIME_VERSION 0, __MSGID_DOMAIN_NOT_IN_HDRS 0, __MULTIPLE_URI_TEXT 0, __NO_HTML_TAG_RAW 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __SUBJ_ALPHA_NEGATE 0, __SUBJ_REPLY 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_IN_BODY 0, __URI_MAILTO 0, __URI_NOT_IMG 0, __URI_NS , __URI_WITHOUT_PATH 0, __URI_WITH_PATH 0, __blackholes.mail-abuse.org_ERROR , __zen.spamhaus.org_ERROR '
X-Spam-Level:
X-Greylist: delayed 330 seconds by postgrey-1.34 at xx1.develooper.com; Tue, 15 Sep 2020 12:14:46 PDT
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2019.11.28.70017
To: bug-DBI@rt.cpan.org
From: "H.Merijn Brand" <tux@freedom.nl>
RT-Message-ID: <rt-4.0.18-4917-1600197296-1119.99508-0-0@rt.cpan.org>
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 1634
On Tue, 15 Sep 2020 13:38:56 -0400, "Sylvain Beucler via RT" <bug-DBI@rt.cpan.org> wrote:
Show quoted text
> Queue: DBI > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=99508 > > > More clearly put: f_dir is only validated through the parameters > vector, not through the DSN vector.
Not validating was on purpose. The folder need not be there before the first action to use it. Inconsistency between parameters and DSN is debatable. I'll think about it ... What the best spot for validation is and when to warn/croak depends on way too many things. Look at f_dir as specifying the SCHEMA in a "normal" database. select * from FOOBLE.bar; is a legal statement, but it will fail if FOOBLE cannot be addressed. A process can put it inside eval {} to catch it. This is how most of DBI operations work.
Show quoted text
> # ls > yy.csv > # perl -MDBI -MDP > -wE'$a=DBI->connect("dbi:CSV:f_dir=./test;f_ext=.csv/r",undef,undef,{RaiseError=>1});$b=$a->prepare("select > distinct foo from yy");$b->execute;DDumper$b->fetch' [ 1 ] # > perl -MDBI -MDP > -wE'$a=DBI->connect("dbi:CSV:f_ext=.csv/r",undef,undef,{f_dir=>"./test",RaiseError=>1});$b=$a->prepare("select > distinct foo from yy");$b->execute;DDumper$b->fetch' No such > directory './test at /usr/lib/x86_64-linux-gnu/perl5/5.20/DBI.pm line > 671. > > Cheers! > Sylvain Beucler > Debian LTS Team >
-- H.Merijn Brand https://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.33 porting perl5 on HP-UX, AIX, and Linux https://useplaintext.email https://www.test-smoke.org http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Content-Description: OpenPGP digital signature
Content-Type: application/pgp-signature
Content-Length: 488

Message body not shown because it is not plain text.

MIME-Version: 1.0
X-Spam-Status: No, score=-1.898 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
X-Cpan.org: This message routed through the cpan.org mail forwarding service. Please use PAUSE pause.perl.org to configure your delivery settings.
X-Spam-Flag: NO
X-RT-Interface: API
Content-Language: en-US
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Virus-Scanned: Debian amavisd-new at mail.beuc.net
Message-ID: <aa27263c-44b9-358a-26b4-74bc8f7b8857@beuc.net>
content-type: text/plain; charset="utf-8"
Autocrypt: addr=beuc@beuc.net; prefer-encrypt=mutual; keydata= mQINBF4bZs4BEADdg+m6olW3LnThg5Xoh1kjy0b8hhQzX/UV0d9OVK8FhEITSPXW8qvnEvap O1LOq07Lo5vZ7TQs053XTt9ZqOP1aR9NQcg0kaakOxIhuvxplDGvsozr3Zq0oTmx5I5VDnZA cKoinKohWUrkzvCECcJawLK7iBhkcJhv4Khgm2nQm3JQLX6Y2y065WVEmmzaNl0tW/Cm/E35 FCRsJ8M2XD5OG6w/jjDJ4PMZ9fXTk7PAWdNXa7edM3oMzNv/h/OLglgUfg3EH9lF9FFr6dNB c7rxCQq839Hrdtai/MhYZARRHUSb3sitpwPEOZz070rDs7tBLyAXO3vyrCc89q+ok8M/7K1S jnWkyqRZC4aCG1rlO7lXscYMfqH6mI3iuGXqZEY35A38Dfc62P8F1alVdx5ZjTFXdB+4JDwx a6150jXVDPHHLai8z2UdgqVFrrrRFUTslFOogJBo9QcyamemwXK8wbCl1GpUjiK3TDQuCdT8 ZrDFBZt6QcFXyJ+6J+Exc+bab2v0tt+Z96olhgh3AnRBB3yzLloOrM70jln6yF6GoAy5gFrU TUuKFmzrn3RGBqQm7JxB7f8pnK4xahdjAZnBdJDzQ4IDoYSPS2nYPgP0XCivb3rG6p5j8gt/ hvGb4rN8Moft+SW8BEZ/CK/Ma7fn4RYvhGAjvYNLaHp2m9Uc9wARAQABtB9TeWx2YWluIEJl dWNsZXIgPGJldWNAYmV1Yy5uZXQ+iQJUBBMBCgA+FiEEPMzGE8NPPVRxipg87ohzVs0vFqAF Al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gG e64oO1w3QJb7jQnQmuDLhGoy+zJevmTlsb3S9migZSjT7Fucf7eX0m2CZ5i0AFTFz0OtbyY4 qSzmLHyMZrxiQh3lirfEUPTmSvs/eRjFcqxZrCwU6E4hI00xkf9CF2LeJf4=
X-RT-Original-Encoding: utf-8
X-Spam-Score: -1.898
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 08E7C240424 for <cpan-bug+dbi@hipster.bestpractical.com>; Wed, 16 Sep 2020 08:50:00 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Py9CAnPgpKCg for <cpan-bug+dbi@hipster.bestpractical.com>; Wed, 16 Sep 2020 08:49:58 -0400 (EDT)
Received: from xx1.develooper.com (xx1.develooper.com [147.75.38.233]) by hipster.bestpractical.com (Postfix) with ESMTPS id 309152402F7 for <bug-dbi@rt.cpan.org>; Wed, 16 Sep 2020 08:49:58 -0400 (EDT)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id A5A277C1C6 for <bug-dbi@rt.cpan.org>; Wed, 16 Sep 2020 05:49:57 -0700 (PDT)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id B68027CF3A for <bug-dbi@rt.cpan.org>; Wed, 16 Sep 2020 05:49:55 -0700 (PDT)
Received: from mail.beuc.net (mail.beuc.net [163.172.36.68]) by xx1.develooper.com (Postfix) with ESMTP id 1BC1E7C1C6 for <bug-dbi@rt.cpan.org>; Wed, 16 Sep 2020 05:49:54 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by mail.beuc.net (Postfix) with ESMTP id 659D06326B for <bug-dbi@rt.cpan.org>; Wed, 16 Sep 2020 12:49:52 +0000 (UTC)
Received: from mail.beuc.net ([127.0.0.1]) by localhost (mail.beuc.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TaE2PB0EaQeA for <bug-dbi@rt.cpan.org>; Wed, 16 Sep 2020 12:49:49 +0000 (UTC)
Delivered-To: cpan-bug+dbi@hipster.bestpractical.com
Subject: Re: [rt.cpan.org #99508] DBI: Tables will erroneously be opened in current folder if f_dir set to a relative path that does not exist
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0
Return-Path: <beuc@beuc.net>
X-Original-To: cpan-bug+dbi@hipster.bestpractical.com
X-RT-Mail-Extension: dbi
Date: Wed, 16 Sep 2020 14:49:49 +0200
X-PMX-Perl: Suspicious Attachment
X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1100_1199 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, SPF_NONE 0, URI_WITH_PATH_ONLY 0, __ANY_URI 0, __BODY_NO_MAILTO 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __HAS_FROM 0, __HAS_MSGID 0, __HTTPS_URI 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __MOZILLA_USER_AGENT 0, __MSGID_DOMAIN_NOT_IN_HDRS 0, __MULTIPLE_URI_TEXT 0, __NO_HTML_TAG_RAW 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __SUBJ_ALPHA_NEGATE 0, __SUBJ_REPLY 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_IN_BODY 0, __URI_NOT_IMG 0, __URI_NO_MAILTO 0, __URI_NO_WWW 0, __URI_NS , __URI_WITH_PATH 0, __USER_AGENT 0, __zen.spamhaus.org_ERROR '
X-Spam-Level:
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2019.11.28.70017
To: bug-dbi@rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Sylvain Beucler <beuc@beuc.net>
RT-Message-ID: <rt-4.0.18-756-1600260600-214.99508-0-0@rt.cpan.org>
Content-Length: 1138
Hi, I'm discussing this issue because it was marked as a security issue under CVE-2014-10401 ("DBD::File drivers can open files from folders other than those specifically passed via the f_dir attribute"), hence distros are now considering whether to backport a fix. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-10401 From a security PoV, it looks like there are 2 vectors to this vulnerability, but only 1 of them is fixed. (Admittedly the severity of the vulnerability doesn't seem high, yet it would be incorrect to mark it as fixed if we don't fully fix it.) In my first reply I noted that the following code in DBD::File:connect() looks like (and is documented as) an attempt to validate the DSN: https://metacpan.org/source/TIMB/DBI-1.643/lib/DBD/File.pm#L109 However it appears not to work, due to attempting to parse $dbname as a full DSN. (The second test: https://metacpan.org/source/TIMB/DBI-1.643/lib/DBD/File.pm#L120 does validate the non-DSN parameters.) You wrote that "Not validating was on purpose", so this is a bit confusing. Are we talking about the same issue? Cheers! Sylvain Beucler Debian LTS Team
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-756-1600260600-214.99508-0-0@rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <aa27263c-44b9-358a-26b4-74bc8f7b8857@beuc.net> <rt-4.0.18-756-1600260600-214.99508-0-0@rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-14706-1601625729-965.99508-0-0@rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 240
Dne St 16.zář.2020 08:50:00, beuc@beuc.net napsal(a):
Show quoted text
> From a security PoV, it looks like there are 2 vectors to this > vulnerability, but only 1 of them is fixed.
The still vulnerable vector (f_dir in DSN) was assigned CVE-2014-10402.
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-26810-1413385133-452.0-0-0@rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-26810-1413385133-452.0-0-0@rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-3685-1601973929-1586.99508-0-0@rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 93
Please prove whether https://github.com/perl5-dbi/dbi/pull/93 fixes the issue for you or not.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.