Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: Eli Schwartz Newsgroups: gnu.bash.bug Subject: Re: Feature Request: Custom delimeter for single quotes Date: Sun, 3 Nov 2019 11:10:44 -0500 Lines: 162 Approved: bug-bash@gnu.org Message-ID: References: <5DBE6EF9.2000309@tlinx.org> <20421118-fb8b-531a-8dfa-bdb53ebb1a95@archlinux.org> <5DBE8CA6.1050800@tlinx.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TWpOYOL87X0QposD5Hik0YwlTnVHBTZp7" X-Trace: usenet.stanford.edu 1572797461 15320 209.51.188.17 (3 Nov 2019 16:11:01 GMT) X-Complaints-To: action@cs.stanford.edu To: bug-bash@gnu.org Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=orion; t=1572797448; bh=PUeYYL5H7ARFpqsLC69n9WYzAp+KGXcud8dhdNttU2Y=; h=Subject:To:References:From:Date:In-Reply-To; b=gQVeS+//g+0Ssbv+/KygxSPjw1Wkx9kcFfCkHtkjG2LVHYANeViH/s/kbC1tpvvAr PK727MiwVrU/mKerxEauqkwX0f2GYYmIqHxj6zpIwyf80azY01mBwM70kOdI5Y6ETb wSQHTJryGB3L4PhFqV931QfyT6V0atV8gDlAfcjdWtyRZMGkZgUnQ4/cj15mRjKhDi 1qEMmwbcCdPGpGlv5G0I4lRzwi7zk5FQpHa0JdVAc12ufNsywKYFYp1kLgC8Cs4dto lW3kqeH/Q19iuH+gFhEihSLpX0mHRBLr/fiFP4zM2v+Xr5wqdS5x2PoqyMTCI28Egy voSEHhDVkyHO83mmGp2sYuqOno0fKntNjSY17CA52F6s+J6XjvvkA3uMrDQlU/pBJX sUOgdy9XhNWKi58YTipb13XjWFxtCDGyNbG32i9lG8xUpUkdTm8pZCW/bo7ApbbYHm cMCmu6WmS9L6olbxYVKqgYj8uWuExkd/BxXScOyR29gAuDIOpya8rbFU48icr19klm jtT8dPQzJwpgHZxJfwOb09v4zFelU+O6THIEHvDBfoF/wdILr2u99kRqZs17cFHVdx N6AtnokF7Smyfzd971071CNEelITsm3i8czoZDeG0b+IkiUx5+zy3gDXaI6+Ie05z7 Whw4BahRsBeG6S/93vFudykI= X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 In-Reply-To: <5DBE8CA6.1050800@tlinx.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:4f8:160:6087::1 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <5DBE6EF9.2000309@tlinx.org> <20421118-fb8b-531a-8dfa-bdb53ebb1a95@archlinux.org> <5DBE8CA6.1050800@tlinx.org> Xref: csiph.com gnu.bash.bug:15564 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TWpOYOL87X0QposD5Hik0YwlTnVHBTZp7 Content-Type: multipart/mixed; boundary="2WvHD4a6ATHZcfwKrXpdKTxWDM5I8FDNs" --2WvHD4a6ATHZcfwKrXpdKTxWDM5I8FDNs Content-Type: text/plain; charset=utf-8 Content-Language: en-US-large Content-Transfer-Encoding: quoted-printable On 11/3/19 3:15 AM, L A Walsh wrote: > Reading your responses, first you tell him he's wrong for combining > languages and try to get him to change that. I offered the recommendation that introducing multiple languages without a good reason is maybe a bit too much context switching. I also told him he's wrong for adding in an additional language if that additional language is not going to actually be used. > Then you tell him his thinking is incorrect in wanting to use shell in > the first place, and bring in FUD for not writing a secure solution > in the first place (weren't they looking for _any_ solution to start > with?). That was followed by more FUD with the specter of poor > performance (maybe on cygwin), Both are valid reasons to want to avoid evaluating unknown input as programming language metacharacters. - Secure solutions are solutions which do not die on syntax errors if userdata is treated as programming language metacharacters. - Secure solutions are also solutions which don't introduce code execution by untrusted users, in the event you don't trust the user. - Using fast things instead of slow things is generally good, and especially good when there are no downsides. I have no idea what the speed of anything is on cygwin, but I'm not super fond of utterly wasteful waste on Linux systems either. > ignoring basic SW development > priorities of _first_ getting to a working prototype. But my suggestion was that it is easier to get a working prototype if you stop adding in artificial complications, like "it must be evaled in a /bin/sh subprocess". > I neglected to catch your submitted solution, BTW, only critique. I did in fact offer a solution. I offered three of them. What I didn't offer was the ruby glue code component, because I am not a ruby user and this is a bash mailing list, so why *should* I know ruby? On the other hand, you did not submit a solution for the ruby side of things either. >> ... once you have a usercmd variable, why do you need >> to printf it into another variable in order to run it ... > ---- > Oh, I dunno, but sometimes, I like to print things out before > I execute them, random stuff like that. I tend to put things > in variables in between steps and leave optimization till later. But you can just print $usercmd. You can run it in eval, too. Did you actually read what I wrote? >> Given many fine answers were already suggested in this thread > --- > Oh look, Patrick already came up with a similar answer -- and > you already judge it as 'fine', Yes, using a shellescape library is a fine answer, assuming that running /bin/sh is actually a requirement. Avoiding the use of /bin/sh entirely is a fine optimization, too (and I encourage this optimization). > so I'll take that as a compliment > on mine as well,=20 You did not propose a shellescape library, do not consider yourself complimented. > compared to your...oh, that's right, you didn't > propose an answer, you just criticized others. I see that spot -- > not putting stuff out there to avoid criticism, while showing off your > knowledge criticizing other people's work. Nice safe way to feel good > about yourself while congratulating yourself on showing those other > know-nothings your stuff. O....kay? >> , can we >> avoid proposing new ones which are both terrible and terrible failures= >> at even being cursorily tested? >> =20 > ---- > You haven't proposed any yet, Interesting definition for the word "three". > but thanks to your feedback, the poster > does have another working example to draw from. You should try it some= time, > though warning, it is hard trying to please others, some people will go= out > of their way to shoot others down... No, just the ones who have a well-known, lengthily historic trend of e.g. saying things that infuriate greycat as well. Other people, I just have strong opinions at, like the strong opinion "I think you would be better served by skipping the /bin/sh stuff if you don't need it and don't use it". If you're going to define "shooting others down" as "tries to propose alternative solutions", i.e. "instead of doing X, have you considered whether Y is actually a better fit for you", then I'm quite confident this conversation will be impossible to continue in any reasonable manner= =2E Then again, your previous history on the archives for this mailing list implies that is probably the case either way. :) --=20 Eli Schwartz Arch Linux Bug Wrangler and Trusted User --2WvHD4a6ATHZcfwKrXpdKTxWDM5I8FDNs-- --TWpOYOL87X0QposD5Hik0YwlTnVHBTZp7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEvSewel70XCra9w4EhIGKaBmvSpsFAl2+/AUACgkQhIGKaBmv Sps29RAApHasKzJf+K0oIdsjbWJ+LJETxgjVH4wfBhgceYbKdJgKOCQEcWAJfDS6 dkOh3TORuGXoLQ/1qzJG9l3Wyd+e+4zY3cLLaTlibKJ8yNq/Jyay0QbhlVCwFX7q qt31ZeQ/BvPvAWhJRkQ5qVp3wH6YhK56wfZQpbqJO9gTyu/v5KN7y06IBRshdyga yTJ9Rudbo/7LXzP83jqm1svFGMey58AFvTbrmtC3tpD+mL78UfH9kC2Rp3TbQOCE 0eMIfiUC2BxNwyA6QiSKKeq5hNz6gn9LLWUbA4ycr5aS7D/Pw6bnwZ/6ttwnQoZM eRc/FhLpJHTOw1zFFyyUwZ9GIf3uCs0VvglBiJThzILHtdwNCrfjSYoX2gxnRzv/ RLL4WwTsIbr2xIW+Vtm6SjLPwE98NwBGEHMM9IDtQpHynjknhjLXp4huaipoXfwc /o6SNPDZpoE4p9AIjPU6JmivN0S6IxFoEBu/oSybx5h9u5+uNvWmQJBIe4cxnU2W HUjVEdprLKscPO5VQEpsTzIejoliBUFlD6oJTXSUZXsS6Pe0K3q+LpI+oNW07/4m 9XKKA7WxvvqkRThPLg+pT/vk6AwVjrGEipAepUT0CcHcUdSP+VvBGNeRzJikGGlZ ig+rHo2X/L7HWEHdAI/vcHirYLB7/154L162jwMGFUFnPNyR3fuJAjM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