Warning about PM attachments

Started by namida, June 16, 2015, 06:05:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

namida

This issue has now been fixed.

An issue has been noticed recently where for some users (including myself - which at least means I can test any fixes without too much hassle), any PM attachments that are plain text - most notably Lemmini or Lix levels / replays - are becoming corrupted upon download, with the last part of the file being cut off. This is on the download side, so the files stored on the server are not corrupted, nothing has been lost.

I'm not able to look into this right away, but I'll be able to within the next few days. In the meantime, please be aware of this issue, and if sending any text files via PM, please either:
a) put them inside a ZIP / RAR / 7Z / etc file
or b) copy / paste the actual text of them into the message (put it in [tt][/tt] or [code][/code] tags if preserving whitespace is important)

As far as I can tell, this does not affect non-text files (such as (Neo)Lemmix levels, archives, images, etc), nor does it affect attachments to regular posts (only to PMs).
EDIT: Seems to be confirmed that it's PM only.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

ccexplore

PM attachments are supported through a mod.  I'm assuming this bug has existed all along and it's just circumstances that it was only recently observed here.  Unfortunately it looks like there hasn't been any updates to the mod from the version currently installed.

I noticed in the Admin section under "Attachments and Avatar" that for "Attachment Settings", there is a "Recode line endings in textual attachments", but its current setting is already disabled (ie. checkbox cleared).  For "PM attachment settings" (which comes from the mod) there is no equivalent option.  I would guess that the mod should've inherited that setting and thus should not have tried to do anything funny with text attachments, but it's now sounding like there may be apparently some bugs in that regard.  It may be necessary to dig into the mod's sources to try fixing ourselves.

namida

Yep. Feel free to have a look at it yourself if you want (back up any PHP files you're going to modify first, of course), otherwise I'll probably get around to it tomorrow (or even later today). As mentioned in the first post, I have confirmed beyond any doubt that there's nothing wrong with the files on the server, it's only when downloaded that issues occur. So, if we find and fix the issue in the board's code, it will fix past uploads too.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

I'm going to start looking into this very shortly. If the site doesn't work and gives error messages, that's why - don't panic, I'll probably notice almost right away that I've stuffed something up, and revert it. Just gonna do a backup first, to be on the safe side (plus because the current backup of content other than attachments and the database is slightly out of date IIRC - eg. may be missing some of the recent smileys, etc).
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

Alright, it's fixed. :)

Indeed, the PM attachments mod wasn't checking this setting. I could probably modify it to respect this setting (and fix the cut-off on posts where it does occur), but for now I've just disabled its text file adjustment altogether - same end effect since we have that option turned off anyway. :)
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Simon

Yes! Free, unmangled text files for free citizens! Thanks for the quick fix.

-- Simon