From: Matthieu Moy <Matthieu.Moy@univ-lyon1.fr>
To: "Antoine Beaupré" <anarcat@debian.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2] remote-mediawiki: limit filenames to legal
Date: Mon, 30 Oct 2017 11:34:11 +0100 [thread overview]
Message-ID: <q7h9fua0zzz0.fsf@orange.lip.ens-lyon.fr> (raw)
In-Reply-To: <20171029181034.27707-1-anarcat@debian.org> ("Antoine \=\?utf-8\?Q\?Beaupr\=C3\=A9\=22's\?\= message of "Sun, 29 Oct 2017 14:10:34 -0400")
Antoine Beaupré <anarcat@debian.org> writes:
> @@ -52,7 +53,7 @@ sub smudge_filename {
> $filename =~ s/ /_/g;
> # Decode forbidden characters encoded in clean_filename
> $filename =~ s/_%_([0-9a-fA-F][0-9a-fA-F])/sprintf('%c', hex($1))/ge;
> - return $filename;
> + return substr($filename, 0, NAME_MAX-3);
There's a request to allow a configurable extension (.mediawiki would
help importing in some wikis, see
https://github.com/Git-Mediawiki/Git-Mediawiki/issues/42). You should at
least make this stg like length(".mw") so that the next search&replace
for ".mw" finds this.
Also, note that your solution works for using Git-Mediawiki in a
read-only way, but if you start modifying and pushing such files, you'll
get into trouble. It probably makes sense to issue a warnign in such
case.
Regards,
--
Matthieu Moy
https://matthieu-moy.fr/
next prev parent reply other threads:[~2017-10-30 10:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-29 16:37 [PATCH] remote-mediawiki: limit filenames to legal Antoine Beaupré
2017-10-29 18:10 ` [PATCH v2] " Antoine Beaupré
2017-10-30 10:34 ` Matthieu Moy [this message]
2017-10-30 12:31 ` Antoine Beaupré
2017-10-29 18:15 ` Antoine Beaupré
2017-10-29 18:15 ` [PATCH v3] remote-mediawiki: limit filenames to legal Antoine Beaupré
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=q7h9fua0zzz0.fsf@orange.lip.ens-lyon.fr \
--to=matthieu.moy@univ-lyon1.fr \
--cc=anarcat@debian.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).