Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Arantor
4456
Hmm, I still get the nesting sometimes with fatal errors and not with others. It tends to be database errors that trigger the behaviour, whereas most manual invocations of fatal_lang_error don't cause it. I still think we need to have the error handler replace <default>

Mind you in the event of a fatal error (assuming it isn't a template error), we probably should consider dropping as many templates as possible because imagine the situation: a portal early in processing adds its templates to the skeleton but never populates them until later, all the added templates could fail too, though I'd probably suggest in that scenario there's a fundamental bug in the portal for not populating its data when adding template blocks/layers.
4457
Features / Re: Unfinished, quite raw, would like some feedback
« on March 10th, 2012, 01:19 PM »
Quote
'fraid so - there is never a good time
I'd argue that generally there's no such thing as a good time for anything, just a collection of variably less bad times, but in this case I'll make an exception; there's always a good time to give up smoking, and it's always 'today' because it'll be better for you in the long run.
4458
Features / Re: Image resizing for non-uploads
« on March 10th, 2012, 01:18 PM »
Hmm, in my test I noticed the .resized was added but clicking on the image did nothing, nor was it with a different cursor.

Would be nice to have Zoomedia on it though, for that extra bit of polish.
4459
Features / Re: Poll mode
« on March 10th, 2012, 12:09 PM »
Quote
- I can either add an id_topic to the poll table, or allow for comma-separated poll IDs in the topic table (or both!) What do you like best? The table solution simply requires adding an extra key (on id_topic), seems simple enough. The poll ID list should be okay too, in the sense that when in Display, we can easily query for the poll details by using id_poll IN ({string:poll_ids}).
Add an id_topic to the poll table (with key as suggested) and repurpose the existing id_poll field as a tinyint to say whether or not there is a poll attached to the current topic. It's the fastest way of dealing with this.
Quote
I noticed that poll questions are limited in size -- varchar(255). I *think* it might make sense to make that size larger, for specific cases...
I've never verified this, but my reading of the rather-vague documentation in MySQL suggests that when using UTF-8 that's actually storing UTF-8 characters, you store them based on the actual number of characters, not the number of bytes. (Certainly it makes reference to CHAR(10) fields in UTF-8 tables taking 30 bytes, as it has to account for 3 bytes per character) This suggests we'd still end up with 255 characters' worth of question even when using multibyte characters, but this needs verification to be sure.
Quote
Heck, if you look into the database structure, there are dozens of varchar(255) that could really benefit from being switched to a larger size, now that we're requiring MySQL > 5.0.3 anyway...
There's a world of difference between 'could really benefit' and 'might be useful', and actually the only ones that stand out in my head as being useful are things like the topic subject. I'm not sure that most fields which are varchar(255) would actually benefit.
Quote
Oh, and while I'm at it... Maybe we could do without the upgrade script?
Interesting idea, though I'm not worried about it at present, that's what beta is for, right? :P
4460
Other software / [live627's rants] Re: These trees are [not] simple
« on March 10th, 2012, 11:09 AM »
Which one, exactly, are you looking at? getBoardList() in Subs-MessageIndex.php is rather simple to use, and I'm guessing you mean getBoardIndex() which is an utter mess?
4461
Plugins / Re: Mad idea but it might just work
« on March 9th, 2012, 11:00 AM »
Quote
Really...? Isn't it just about PHP files, not other files containing PHP or whatever?
The odds of attachments being modified is slim, but should not be ruled out. It's one of those things that is a necessary risk.
Quote
Also, these folders have a redirection through an index.php file, which I can tell you they do execute...
index.php will when it's called in a DirectoryIndex capacity (i.e. /cache/ or /cache/data/ only) but actual .php files otherwise should be neutered by this in /cache/.htaccess:
Code: [Select]
<Files *.php>
Order Deny,Allow
Deny from all
</Files>

But it's not protected on IIS or nginx.
Quote
It just treats it as a 404 error (i.e. no redirection in the address bar but we do get the homepage.)
That's because any requests made are caught by the 404 handler. That's still not a risk in itself though.
Quote
They're only regenerated if a component has been modified -- which is very likely in beta, but unlikely after that.
Hmm, that's a valid vector - but I was thinking more of the PHP side, wherein everything in /cache/data is rebuilt periodically.
4462
Plugins / Re: Mad idea but it might just work
« on March 9th, 2012, 09:28 AM »
Sure, the attachments, avatars,and the gallery folders are at risk from files being overwritten/corrupted, but they're theoretically safe against PHP being dumped in them and executed - because there's an .htaccess ruleset against PHP execution from those folders.[1]

The cache is a trickier one but the entire cache folder is marked as inaccessible to outside PHP calling, which means the risk then becomes against the cache files themselves being abused, but since they're regenerated regularly, that's not as much of a deal, especially if the core files are never made world-writable, because the cache files will be owned by the webserver user - while all other files should be owned by the user.

The problem is with uploaded PHP files. As it stands currently, they will not be owned by the user, which makes them a risk. Sure, we can prevent people people calling PHP files directly[2] but the fact remains that they won't be owned by the user whose account it is and will be vulnerable to attack from other users on shared hosts.

Even if they're then made 644, they're *still* vulnerable because they're owned by the webserver user and anyone else can still get to the files to modify them. My proposal should negate that risk entirely, especially since it should also provide no reason for people to make anything higher than 644/755 (bearing in mind that those permissions then apply to the account holder not the webserver user)
 1. I also note that IIS and nginx are not accounted for, however I figure anyone using those will probably ask for details of what they need to do and we can deal with that on a case by case basis.
 2. I don't know why I haven't thus far actually, I did put in a protection against people trying to download archives from there.
4463
Plugins / Re: Mad idea but it might just work
« on March 9th, 2012, 12:45 AM »
Yes, I was talking SFTP in the truest sense of SSH-FTP (as opposed to FTPS), and it's a *much* more sane approach (none of this virtual path crap), but you're right, most shared hosts don't offer it, ironically they'd be the ones who would best benefit from having it available.

The whole fundamental problem that is attempting to be solved here is how to, essentially, secure files that are intended to be executed within something that's conceptually the sandbox of user permissions without having to have them owned by the webserver and without having to have them worry about umasks or anything else; if it is conceptually the same as uploading via FTP it will inherit your account and so on - this is primarily FOR shared hosts.

Eh, I've gone back over the FTP class in SMF/Wedge, and I think I'm going to end up doing the same thing, the whole shebang manually, because I can't rely on any of the easier methods. Though I'm not quite sure whether I should attempt to use IPv4 first and only then fail over to IPv6 if that doesn't work, or attempt IPv6 first and try and catch what happens after.
Quote from Norodo on March 9th, 2012, 12:00 AM
I can't think of any webhosts that don't offer SSH. I know Dreamhost and GoDaddy does, and so does Nearlyfreespeech.

I'm sure there are some, but I'd think they are fewer than you seem to think.
I stand corrected as far as GoDaddy and DreamHost are concerned, having just double checked that (since I couldn't believe they'd use a proper protocol for all standard customers)

I guess I'm just very sceptical as far as these things are concerned, simply because I've seen too many people burned in the past.

The problem then to deal with is how to get people to understand about SFTP credentials, because I doubt most people have heard of it, and just for fun, there's also FTPS which is a very different thing all together.
Posted: March 9th, 2012, 12:06 AM

I'd also note that it does rule out 000webhosting.com who only offers a single FTP account for the free service, which is what most of their forum customers tend to use.
4464
The Pub / Re: ¿BBCode tabs?
« on March 8th, 2012, 10:25 PM »
Considering the complexity, a plugin is the better route, but even then about an hour tops.
4465
The Pub / Re: ¿BBCode tabs?
« on March 8th, 2012, 09:55 PM »
Aside from the fact I don't see how you get from that bbcode to the layout shown, it isn't that hard to add to Wedge but definitely not as core.
4466
Plugins / Re: Mad idea but it might just work
« on March 8th, 2012, 09:27 PM »
HTTPS is a choirboy compared to FTP. Even SFTP is preferable.
4467
Features / Re: Poll mode
« on March 8th, 2012, 09:26 PM »
As long as it lets me style the bars like I'm suggesting, it's all good.
4468
Features / Re: Poll mode
« on March 8th, 2012, 09:00 PM »
Oh I didn't expect the default skin to do that, just  have the classes to support it ;)
4469
Features / Re: Poll mode
« on March 8th, 2012, 08:42 PM »
Sure it's already recorded, it just needs displaying.

Regarding vB, it is similar to SMF/Wedge, just you have different coloured bars, one bar red, one purple, one blue etc. All I'm saying is to add classes to differentiate the bars, for style purposes.
4470
The Pub / Re: Logo Madness
« on March 8th, 2012, 05:52 PM »
* Arantor would press the Like button if he had implemented it at this point.