From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 032AC1F8C6 for ; Wed, 11 Aug 2021 11:26:19 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 0/3] lei pathname canonicalization fixes Date: Wed, 11 Aug 2021 11:26:15 +0000 Message-Id: <20210811112618.24084-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Pathnames with "x/../y" components weren't being canonicalized properly after creation, and some of it was being put into the lei_mail_sync.sqlite3 DB and configs for saved searches. This will become more important as we start using inotify more to track keyword changes on messages. Eric Wong (3): treewide: use *nix-specific dirname regexps lei_saved_search: canonicalized relative save paths lei: attempt to canonicalize away "/../" pathnames lib/PublicInbox/IMAPTracker.pm | 4 ++-- lib/PublicInbox/LEI.pm | 16 +++++++++++----- lib/PublicInbox/LeiALE.pm | 8 ++++---- lib/PublicInbox/LeiBlob.pm | 4 ++-- lib/PublicInbox/LeiInit.pm | 3 +-- lib/PublicInbox/LeiLcat.pm | 2 +- lib/PublicInbox/LeiOverview.pm | 2 +- lib/PublicInbox/LeiQuery.pm | 2 +- lib/PublicInbox/LeiRediff.pm | 2 +- lib/PublicInbox/LeiSavedSearch.pm | 9 ++++++++- lib/PublicInbox/LeiUp.pm | 2 +- lib/PublicInbox/OverIdx.pm | 4 ++-- lib/PublicInbox/Xapcmd.pm | 5 ++--- script/public-inbox-init | 3 +-- t/init.t | 1 - t/lei-q-save.t | 9 +++++++++ t/lei_xsearch.t | 8 +++++--- 17 files changed, 52 insertions(+), 32 deletions(-)