Wakaba & Kareha 3.0.0 (349)

1 Name: !WAHa.06x36 : 2005-10-30 18:57 ID:j/j8XBOa [Del]

So, it's finally release time!

http://wakaba.c3.cx/releases/wakaba_3.0.0.zip
http://wakaba.c3.cx/releases/kareha_3.0.0.zip

I decided to bump the version number up to 3.0.0, partly because of a number of new features, and partly because there's been lots of messing around in the guts of the scripts, which means there are probably some new and interesting bugs. I do not recommend installing these scripts on any busy boards without doing some testing first, or waiting for others to test them for you. Conversely, testing is very welcome. Report those bugs!

Specific information will follow in the next posts.

2 Name: !WAHa.06x36 : 2005-10-30 19:02 ID:j/j8XBOa [Del]

First off, new features that are available in both scripts (either due to re-use of wakautils.pl or kopipe magic):

  • Thanks to coda, there is now support for networked includes. wakautils.pl now has a function named get_http() which does HTTP downloads with caching. It can be used in header.html and friends by putting in a <const get_http("http://domain.com/header.html")>
  • More options for displaying IDs. There are now "ip", "host" and "mask" options that replace the ID with either the poster's IP address, host name, or masked IP address. The masked IP is encrypted (and will change according to the thread, day and board options), but similar IPs produce similar strings.
  • Bugfixed Javascript code. Cookies work better, and >> quoting should behave more sanely.

3 Name: !WAHa.06x36 : 2005-10-30 19:06 ID:j/j8XBOa [Del]

New Wakaba features:

  • Thanks to dmpk2k, there are now a bunch of new (somewhat experimental) features. Unfortunately, I don't know all that much about how all of them work, and I hope dmpk2k will fill us in with some details. Anyway, there is:

    • Load balancing of images across multiple servers.
    • Proxy detection
    • Captcha overrides
    • SILLY_ANONYMOUS ported to Wakaba!
  • Wakaba now rebuilds wakaba.html if it doesn't exist. This should cause less confusion on new installs.
  • Admin logins can now use a cookie to stay logged in for easier admin work.
  • There is some (somewhat untested) support for Hello Kittying (replacing deleted images with a stock image).

4 Name: !WAHa.06x36 : 2005-10-30 19:13 ID:j/j8XBOa [Del]

Kareha changes and features:

  • Lots of page layout changes and CSS changes, mostly to better match 0ch. After upgrading a board, a shift-reload might be necessary. Also, the Amber style hasn't been updated, and should be deleted, because it's now even uglier than normal.
  • The filetypes/ALLOW_UNKNOWN bug has been fixed.
  • Kareha always shows >>1 when displaying normal post ranges.
  • Most thread links now link to l50.
  • Fusianasan has been implemented.
  • Capcodes now support inserting HTML code (note that the config.pl format for capcodes has changed).
  • There is now both manual and automatic thread closing.
  • IDs can be configured to show "Heaven" only on sage.
  • Fixed the ugly captcha CSS bug.
  • Support for different kinds of markup.

5 Name: !WAHa.06x36 : 2005-10-30 19:20 ID:j/j8XBOa [Del]

More changes that affect both scripts, because I forgot a bunch in >>2:

  • ASCII control codes are now filtered out and don't cause XML errors.
  • Thumbnailing now supports GD (very untested, might break, might need gif2png installed), and sips (an image processing utility installed by default on Max OS X 10.4, and maybe older versions).
  • Some fixes to make WakabaMark break a bit less.
  • Javascript for inserting text works better in Firefox.
  • Secure tripcode vulnerability has a better fix, and most of the crypto code has been upgraded to be more robust. As a consequence, secure tripcodes have changed!

6 Name: !WAHa.06x36 : 2005-10-30 19:23 ID:j/j8XBOa [Del]

Also, Kareha now has an admin script. However, I was sort of tired of workin on this for now, so the design is pretty ugly and half-assed. It does work, though. It still needs some things, like the easy interfacing with a banning script I mentioned earlier (if you want to do this, you can edit the templates to include the approriate links, though). It also needs a better layout and some non-ugly CSS. Squeeks has indicated he might do some work on the latter, but if anyone wants to help out with this, go right ahead.

Well, that is about that. I'm sure I forgot a bunch of stuff, though. I'll post more as I remember it.

Now, report those bugs!

7 Name: Anonymous : 2005-10-30 20:36 ID:581OH/XS [Del]

So...who is testing it?

8 Name: narunet!parlrLMFwQ : 2005-10-30 22:41 ID:mrfJrI79 [Del]

9 Name: dmpk2k!hinhT6kz2E : 2005-10-31 00:09 ID:Heaven [Del]

Wakaba also can also now archive posts and images once they're bumped off the board, for our dear packrat administrators.

I also (highly) recommend administrators of current boards run cleanup.pl in wakaba's root, since 2.1.4 doesn't always get rid of thumbnails like it should. Make sure to make a backup copy of thumb/ first.

10 Name: Anonymous : 2005-10-31 00:58 ID:581OH/XS [Del]

Please describe archiving behavior. (Bonus points for 10 words or less.)

11 Name: dmpk2k!hinhT6kz2E : 2005-10-31 02:55 ID:Heaven [Del]

Old data is never deleted, just moved.

12 Name: dmpk2k!hinhT6kz2E : 2005-10-31 03:18 ID:Heaven [Del]

Anyway, some explanation of the load balancer. Let's assume the board is shii/* (ie: shii/wakaba.pl, shii/config.pl, etc):

To enable this, do the following:
a) Copy shii/extras/load_balancing/sender.pl into shii/
b) Create shii/redir/
c) in shii/config.pl, set ENABLE_LOAD => 1
Other options: LOAD_LOCAL is a variable that gives a rough estimate how much bandwidth the local boards has per month.
LOAD_HOSTS lists other hosts to send to, their access passwords, and their bandwidth per month. See example below.
d) If you have an old board already set up, you need to convert to the balancer mode. Do this by copy shii/extras/load_balancing/redir-convert.pl into wakaba's root, and run it.
e) Refresh cache from management panel.

Before you do all the above, you'll first want to copy shii/extras/load_balancing/loader.pl to the other hosts that will be helping balance. Make sure they can execute, have permission, and that the PASSWORD in loader.pl has been changed from CHANGEME.

An example:
I have three hosts.

  • the main board, which has 100GB per month
  • mirror A, which has 30GB per month, a password of "zOMG", and a loader address of www.zomg.com/shii/loader.pl
  • mirror B, which has 50GB per month, a password of "mootykins", and a loader adddress of www.4chan.org/shii/loader.pl

LOAD_HOSTS in config.pl is set up as follows: ([host 1, password, bandwidth], [host 2, password, bandwidth], ..., [host n, password, bandwidth]). So, for the above example the line would become:

use constant LOAD_LOCAL => 100;
use constant LOAD_HOSTS => (['http://www.zomg.com/shii/loader.pl', 'zOMG', 30], ['http://www.4chan.org/shii/loader.pl', 'mootykins', 50]);

13 Name: dmpk2k!hinhT6kz2E : 2005-10-31 03:38 ID:Heaven [Del]

The proxy detection in wakaba is a lot fancier than in futaba, for example. It has an age/refresh mechanism where it never scans recognized IPs, so a poster will only be scanned once, unless their IP changes or they don't post again before their entry in the proxy code is deleted (default of seven days). The proxy detection is also somewhat voodoo, for two reasons:

  • You need an external program (for now)
  • You need to know how to configure that program.

Most of the hard work has been done though, so to get a basic anti-proxy system running, do the following:

Download proxycheck from http://www.corpit.ru/mjt/proxycheck.html and compile it. Put it in wakaba's root (or in my case, below root, but you'll need to add ../'s to PROXY_COMMAND)
Change PROXY_COMMAND in config.pl.

The default line in config.pl is a good guideline of what to start with. Don't change much other than the CHANGEME (and the "CHANGEME ESMTP", which should also just be "CHANGEME"). In other words, leave the option switches the same. If you want a ready-made line, here's what I use:

use constant PROXY_COMMAND => '../proxycheck -s -d achaea.com:23 -c chat::"Multi-User License: 100-0000-000" -aaaa';

What this does is attempt to connect through a potential proxy to achaea.com, port 23. Achaea is a MUD, and one of the strings it always returns on its own line is "Multi-User License: 100-0000-000". What proxycheck will be looking for is that line. The reason I chose this is because it never changes. You can use other things too, like an SMTP server, but only if you're certain that the greeting string never changes.

If you get PROXY_COMMAND wrong, or the string it's looking for goes out of date, no blocking will occur at all.

One last comment: I recommend every board set this up if possible, but leave ENABLE_PROXY_CHECK => 0 (in other words, leave it off). It's only meant for use when a board is under active attack, because it also will lock out some legitimate traffic. Some of the board users seem to have a habit of using a proxy, and they won't be able to post while this is enabled, so it won't just block hostiles.

14 Name: dmpk2k!hinhT6kz2E : 2005-10-31 03:40 ID:Heaven [Del]

Hey, is WakabaMark enabled or not? It just ate my asterisks in front of "Download _proxycheck_..." and "Change PROXY_COMMAND...", but when I look the formatting is set as none.

Yet for some reason I can do _this_.

15 Name: dmpk2k!hinhT6kz2E : 2005-10-31 03:41 ID:Heaven [Del]

Uh... never mind?

16 Name: dmpk2k!hinhT6kz2E : 2005-10-31 03:48 ID:Heaven [Del]

Captcha overrides are a little feature put together that allows certain tripcodes to post without ever entering a captcha. This is handy for mass posters, since they don't like repeatedly entering tripcodes.

To add a tripcode, go to the Bans/Whitelist of the management panel, and add the person's tripcode in the bottom-right form (the one with "Tripcode", "Comment" in it). The tripcode it the person's encoded tripcode, with the leading !.

So, for example, in "dmpk2k!hinhT6kz2E", the tripcode to enter would be "!hinhT6kz2E". For the comment field I usually put the poster's name, since I don't usually remember tripcodes.

Once you click on "No Captcha", and entry should appear in the table belog that specifies the tripcode as "NoCap". For this point on the target person won't need to enter a captcha. Be aware that this does open you to abuse if the person turns hostile, or someone else finds out their tripcode and goes on a spamming spree.

17 Name: dmpk2k!hinhT6kz2E : 2005-10-31 03:57 ID:Heaven [Del]

Requesting Admin password and Remember me on this computer in the management panel be moved to the same line in a future update. It doesn't look nice the current way.

18 Name: dmpk2k!hinhT6kz2E : 2005-10-31 04:11 ID:Heaven [Del]

One last thing, for those who decide to use wakaba's load-balancer, please be aware that it still needs some bugs hammered out. The main one is that as of this writing I don't think it properly takes the bandwidth of each host into account.

In other words, even if you enter the 100, 30, 50 given in the example above (>>12), it seems that it's allocating redirects evenly between each one, not the 55%, 17%, 28% you'd expect.

If someone uses the load balancer extensively, please let me know so I can grab copies of what's in redir/. It'll help me confirm whether the ratios between board bandwidth is being considered or not.

19 Name: !WAHa.06x36 : 2005-10-31 04:49 ID:j/j8XBOa [Del]

Also, archiving is disabled by default. It can be enabled in config.pl. It needs the arch/ directory, with src/, thumb/ and res/ subdirectories.

20 Name: !WAHa.06x36 : 2005-10-31 13:25 ID:j/j8XBOa [Del]

You people are slow! I already found one bug: The RSS is kind of broken. Anything else before I package up a 3.0.1?

21 Name: Anonymous : 2005-10-31 13:32 ID:dCfJ21Tt [Del]

What I meant was, what is the interface someone would use to access archived pictures? Both admin and user, if they're different.

22 Name: !WAHa.06x36 : 2005-10-31 14:34 ID:j/j8XBOa [Del]

They're just stuffed in a directory. It's up to the admin what to do with the files later.

23 Name: Anonymous : 2005-10-31 16:16 ID:Heaven [Del]

After login in Karehas admin.pl I always get an "Thread specified does not exist." error message if I call admin.pl without anything in PATH_INFO. Things like admin.pl/list or admin.pl/$thread do work.

24 Name: !WAHa.06x36 : 2005-10-31 19:36 ID:j/j8XBOa [Del]

That's weird, it works fine here... What Perl version?

25 Name: Anonymous : 2005-10-31 20:02 ID:Heaven [Del]

Perl 5.8.7. It only happens if the total number of existing threads is less then THREADS_DISPLAYED in config.pl.

26 Name: Anonymous : 2005-10-31 20:21 ID:Heaven [Del]

have you seen the new "newsticker" on 4chan? Worth emulation in an official release y/n?

27 Name: dmpk2k!hinhT6kz2E : 2005-10-31 20:37 ID:Heaven [Del]

> Anything else before I package up a 3.0.1?

I have several things I'd like to submit for Wakaba. Hopefully you only intend to keep major version number in sync between Kareha and Wakaba, not minor.

28 Name: Anonymous : 2005-10-31 22:27 ID:Heaven [Del]

The S_NEWTHREAD constant is defined twice in Karehas template.pl (line 24 and 30).

29 Name: Anonymous : 2005-10-31 22:38 ID:Heaven [Del]

>>26
rules.html can be meant for board- or site-wide announcements.

30 Name: Anonymous : 2005-10-31 22:57 ID:Heaven [Del]

>>20
Not a bug, but is there a reason you've consciously kept the image details italicized in both Futaba templates?

31 Name: Anonymous : 2005-10-31 23:45 ID:Heaven [Del]

While we're on that topic, I got rid of a few moldy leftover interface strings in Kareha's mode_image and cleaned up the error strings for coherence and professionalism, on top of removing the <em> brackets in the file details header. Do what you wish with the changes.

http://rapidshare.de/files/7030610/templates.pl.html

32 Name: !WAHa.06x36 : 2005-11-01 05:11 ID:j/j8XBOa [Del]

>>26

As was pointed out, that's not really the task of the script, that just involves admins keeping rules.html updated in one way or another.

>>27

Neither, really.

>>30

It has been requested in the past. And I do think it makes it a lot easier to see.

33 Name: Anonymous : 2005-11-01 09:54 ID:Heaven [Del]

plz2fix css
BAD:

body {
background-color: #6B7B8D;
}

GOOD:

html {
background-color: #6B7B8D;
}
Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: