[Slackbuilds-users] Odd character in JSONObject.info file

B Watson yalhcru at gmail.com
Sat Feb 16 08:50:26 UTC 2013

On 2/15/13, Chess Griffin <chess at chessgriffin.com> wrote:
> If you open up JSONObject.info in nano (not seen in vim), there is an
> odd character at the start of the PRGNAM= line:
> 1»¿PRGNAM=JSONObject

It's a BOM (byte order marker). Doesn't show up in vim
because vim is unicode-aware and will ignore it. See

It was probably put there by the submitter's editor because his first name
(Mário) includes a non-ASCII character.

> While parsing the .info files for PRGNAM, bash appears to try and
> execute this line, which may be a security issue.  Anyway, a simple
> edit of that file in the repo should take care of it.

It's not so much of security risk, but it'll break any script (such as
sbopkg) that expects to parse PRGNAM out of the .info file. Try:

( set +x ; . JSONObject.info ; echo $PRGNAM )

It'd be worthwhile to add a check to the site's upload handler so it'll
reject text files (.SlackBuild, .info, slack-desc) that start with a BOM,
or maybe it could just remove the BOM.

More information about the SlackBuilds-users mailing list