Use Wikipedia Onebox for other MediaWiki sites


(Freso) #1

Currently wikipedia.(com|org) is hardcoded in wikipedia_onebox.rb, but there are plenty of other MediaWiki driven sites for which this onebox would (or should!) work just the same.

It would be neat if it could be made possible to list other sites/URLs to get parsed by this onebox.


(Jay Pfaffman) #2

admin/settings search for “onebox”. There is a domain whitelist. You can add “com” (or maybe it’s .com I’ve not bothered to figure out which and just put both) if you want to whitelist everything. I’m not quite sure why this level of paranoia is necessary, so I eventually added com, edu, and so on.


"onebox domains whitelist" and subdomains
(Freso) #3

That doesn’t trigger the wikipedia_onebox.rb onebox script though, which has neat stuff like showing the specific referenced section (also, apparently not all MediaWiki sites return proper “onebox” data, e.g., Iframely URL Debugger - Open Graph, Twitter Cards, oEmbed )


(Jay Pfaffman) #4

Oh. (I should have been clued in to that by your referencing the source.)

And wow. I hadn’t realized how many of those oneboxes were hand-coded for each site. I’d been crediting those sites with making that happen.


(Jeff Atwood) #5

It becomes very easy to DDoS your site by writing a post with a hundred oneboxes, etc. And most sites on the web don’t support opengraph or oembed, so it’d be a wasted HTTP request for every URL.


(Jay Pfaffman) #6

Aha. Well, now I see. That’s helpful.

I suppose if I had thousands (or even hundreds) of messages per day rather than dozens, and I wasn’t having people post oneboxes of their Wordpress sites I might go ahead and be properly paranoid sooner rather than later.

Thanks