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
3571
Archived fixes / Re: Time offset (auto detect)
« on April 27th, 2012, 05:27 PM »
Quote
But the server uses unix timestamps, doesn't it..? Isn't this a UTC timestamp?
No, it's the server's timestamp. i.e. it's however many seconds since 1/1/1970 relative to the server's timezone. Super happy fun times.
3572
Features / Re: Moving topics, you can now send a PM
« on April 27th, 2012, 05:26 PM »
I'd go with the meta implementation, but I'd do it based on just hiding the board generally rather than using it for ignore boards.
3573
Archived fixes / Re: Preparsing adds url bbc where it shouldn't
« on April 27th, 2012, 05:24 PM »
Does it? I've not noticed any other problems since then.
3574
Archived fixes / Subjects with quotes in them are broken
« on April 27th, 2012, 05:24 PM »
I know it's been mentioned somewhere else but I wanted to discuss it here properly... eh, I did subsequently find it in the test board, http://wedge.org/pub/test/7303/test-topic/ where I mentioned the following:
Quote
Well, historically everything was done using htmlspecialchars with ENT_QUOTES so if it's not doing that now, there's a reason - and very likely that reason is code we've changed rather than code that's buggy in SMF.

Also note that the DB here isn't a true SMF database but one from Noisen's code which did have a lot of changes, and possibly including some that affected htmlspecialchars.

I'm fine with switching to ENT_NOQUOTES for such, provided that we can be certain there's no XSS injection risk. (There shouldn't be an SQL injection risk because of the query layer doing its own quoting.) It will certainly space some space (including the extra byte per row that I wanted to spend making it mediumtext ;))
Here's the problem: we don't re-encode it again in the display template. However, part of me thinks it would be better to re-encode it on saving and display the safe version at all times, rather than have potentially unsavoury content in the DB that could be used by plugin code that assumes it's safe like SMF does.

Thoughts?
3575
Archived fixes / Re: Preparsing adds url bbc where it shouldn't
« on April 27th, 2012, 05:18 PM »
This seems to be fixed now Nao has altered the code, and I've certainly not seen any problems since :)
3576
Features / Re: Moving topics, you can now send a PM
« on April 27th, 2012, 05:05 PM »
I don't think the meta board should be apparent, really. It is a meta board, not a physical one. Though you'll have to do some magic in the admin area for it, of course, and make sure that normal board operations exclude that board too, so that you can't readily move topics into it.[1]
 1. Though I could well imagine cases where you'd move topics out of that board and into a normal board, just not the other way around.
3577
Archived fixes / Re: Time offset (auto detect)
« on April 27th, 2012, 05:03 PM »
Quote
Wouldn't it be simpler to just set the server/mysql time to UTC..?
No, because the system's clock will update with its local timezone rules, so you have to get that right, otherwise you'll get DST applying at times you have no knowledge of whatsoever.
Quote
I'd like for timezones to be able to automatically apply the timezone's daylight savings to a unix timestamp immediately... Dunno if they do that, honestly
They don't. You certainly could do it yourself, if you knew the timezone the post was written in, but that means storing it per post and doing extra calculations to do it. But for the extra hassle, it seems... overkill.
3578
Features / Re: New revs - Public comments
« on April 27th, 2012, 04:59 PM »
Quote
Hmm, with all due respect, did you look at my commit...? Because it returns a sprintf'ed string every time, even if the string isn't an array... (Which basically means, "it's _n all the way.")
No, I was responding to your comment, which seemed to imply that sprintf wasn't needed, and I wasn't sure how the code seemed relevant as it seemed to be discussing something not yet entirely implemented.

In any case I have a lot going on in my head right now, making it hard to cope with the fact that in between trying to work on Wedge, I'm also trying to learn Node.js[1] + Socket.IO + Express + MongoDB for something I need to build, plus some other stuff going on that is... complicated, so I do miss a lot of the subtlety, even though I have looked over the commits lately.
 1. Holy fuck this is a piece of work, even without the nightmare that is their module manager
3579
Bug reports / Re: Pretty URL remarks
« on April 27th, 2012, 04:55 PM »
Quote
Why would your site be insecure just because there's an option to update the files...?
Because just about every system ever designed to do that has to make the files writable to the webserver. Which means making everything 777. Or you fuck around with creating a manual S/FTP connection, unpacking the update file by file and uploading it via S/FTP that way. While the latter is feasible for plugins, it simply isn't feasible for large-scale updates. And that still assumes the system is actually running FTP or SFTP, systems like IIS won't be. (And believe me, getting it running properly on there is a nightmare)

So if you don't fuck about with S/FTP, you tell people how to chmod or chown (and just look at how many support topics there are on SMF for this) their files, and once it works, they're not going to put it back to secure afterwards.
Quote
I'd really like for Wedge to be able to say that "our installed base has zero security holes"...
Isn't going to happen. You'll always have people who won't upgrade because they've made custom changes they won't upgrade for, or because they think that their plugins won't work.

But, it's interesting to note that the systems that have one-click updates are more routinely victims of server abuse through files being infiltrated (because of poor permissions setup) than those that don't.

Even putting aside these factors, you're left with an update system that makes the files insecure by default, or an update system that is secure by default but requires users to do some work to keep it up to date. I'd certainly prefer the latter, especially as updates should just be a case of uploading a new set of files, nothing more.
3580
Features / Re: Moving topics, you can now send a PM
« on April 27th, 2012, 04:42 PM »
Oh, I've been thinking about it today, even looking at how XenForo handles the user side (I'll do the backend quite differently at least, but the user-side does give me a few things to think about) The big problem is how to keep it manageable given some of the things that need to be handled, but I'm sure I'll figure it out.

*nods* I like where you're going with this, too :)
3581
Archived fixes / Re: Buffer hook never called
« on April 27th, 2012, 04:41 PM »
Then you need a bigger stick with a sharper point on it, I didn't notice it :hmm:
3582
Bug reports / Re: Pretty URL remarks
« on April 27th, 2012, 04:40 PM »
I'm sorry, I'm not prepared to accept being insecure by default just because people are too lazy to do some work themselves occasionally.

Here's the thing: other platforms don't have one-click upgrades, and they're absolutely happy with this for exactly the same reason I am.
3583
The Pub / Re: Number of 'online users'
« on April 27th, 2012, 04:38 PM »
Quote
I'm also still bothered by the fact that you don't seem excited about associating IPs with sessions so that guests without cookies could at least be tracked...
I'm not excited, the whole concept is fundamentally flawed.

Maybe when IPv6 is widespread and everyone's using it we can reconsider it but there are so many foibles attached to using IP as 'detection' that it's unreal.

* there are still users shuffled behind a massive network so that they have different IPs over time, sometimes per page, though this is distinctly less common than it used to be.
* users behind any kind of proxy will be lumped together under fewer IPs, meaning that for example the one forum I work on will only ever show 1 guest because of way requests are routed to it behind the firewall, it only ever sees 10.0.0.2 as the incoming IP address. EVER. Kind of renders everything else moot for that user.
* it still treats different Google (+Bing+Baidu) bots as separate users.
* spammers can and will inflate this artificially.
* mobile users are still likely to be incorrect, especially if they happen to be on the move between cell towers, again it's routed through a proxy, though a much larger one.

IP != identification of any kind.
Quote
Ideally, we would issue sessions for guests that allow for cookies. Meaning that they'll never get a session started on first visit, but if we (still) attempt to set a cookie, the next page they view will then start a session, so they should be able to log in, right...?
That's where it gets complicated. If we don't track sessions for guests, they can still log in, with the session and cookie generated after successful authentication. All we lose at that point is the ability to validate that they came from an existing page to log in (but that's not really a massive prevention layer)

As far as handling failed logins and preventing more than 3, that would have to be done in a session but there's no reason we need to start sessions all the time for every user/guest/wandering monkey, which is where I'm going with this.


Though, disregard the whole cookie aspect. For the purposes of what I'm suggesting, the fact that cookies are used is almost irrelevant; the fact we're doing sessions at all for guests outside of logging in is a massive amount of per-request overhead that I don't think we need to handle since all we're actually doing in those cases is analytical stuff and vague storage.

What, exactly, do we need to store in the session regarding mobile detection?
3584
The Pub / Re: The Cookie Law (in the UK at least)
« on April 27th, 2012, 03:26 PM »
*nods*, I just had to dive in and see for myself.

I'd note that it's... complicated... to use their code since they're using a modified GPLv3 licence which is going to fuck everyone around anyway.
3585
The Pub / Re: The Cookie Law (in the UK at least)
« on April 27th, 2012, 02:58 PM »
Quote
Yes that is the IP Address my ISP tells you I'm on, but according to my desktop gadget, my external IP is 120.28.248.151 - go figure!
The IP address used is the one the webserver itself received - if it's behind a firewall it might be the internal IP rather than an external one. It's... complicated.
Quote
To save you rushing over there, I'm attaching both to this post.
Thanks, though I really wanted a link so I could see them in action before I looked at any code. It's not always practical to study code to see the result you will get from it ;) Still, always good to have the code handy.