January 27th, 2002

livejournal: anum feature

Module Name: livejournal
Committed By: bradfitz
Date: Sun Jan 27 23:09:08 UTC 2002

Modified Files:
---------------
livejournal/bin: moveucluster.pl
livejournal/bin/upgrading: update-db-general.pl
livejournal/cgi-bin: ljlib.pl ljprotocol.pl ljviews.pl talklib.pl
livejournal/htdocs: talkpost.bml talkpost_do.bml talkread.bml

Log Message:
------------
In the new system, all journal entries have 8 bits of randomness
associated with them (the 'anum', or 'access number'). In
itemids that are shown to the public, the real jitemid (24 bits)
is shifted 8 bits left, and the anum is in the low 8 bits.

This patch adds support for that everywhere, including making
the anum values in postevent and in conversion from the old schema.

Advantages of anums:

-- slow spammers down (by 256), and using statserv daemon, log
heavier bogus requests (talkpost_do.bml hits with wrong anums)

-- fits in 32 bit int still. looks like decimal itemid still.

-- obscures the per-user sequential nature of jitemids, so people
can't tell: 'oh, i can see 1, 2, 4, and 5.' where's 3? aren't
i a good enough friend?

-- in new system, an itemid can be reused if it's at the end (due
to how mysql assigns auto inc. values in multi-column identity
columns). having this bit of randomness to add to the public
itemid makes sure old links to old newest post don't work (probably)
for the new post. but this wasn't a goal... just a nice side
effect.

Really, the main goal is to make it harder for people to enumerate the
entire database with a simple script that counts up.


To generate a diff of this commit:
cvs rdiff -r1.8 -r1.9 livejournal/bin/moveucluster.pl
http://danga.com/lj/cvsweb.cgi/livejournal/bin/moveucluster.pl.diff?r1=1.8&r2=1.9
cvs rdiff -r1.39 -r1.40 livejournal/bin/upgrading/update-db-general.pl
http://danga.com/lj/cvsweb.cgi/livejournal/bin/upgrading/update-db-general.pl.diff?r1=1.39&r2=1.40
cvs rdiff -r1.133 -r1.134 livejournal/cgi-bin/ljlib.pl
http://danga.com/lj/cvsweb.cgi/livejournal/cgi-bin/ljlib.pl.diff?r1=1.133&r2=1.134
cvs rdiff -r1.66 -r1.67 livejournal/cgi-bin/ljprotocol.pl
http://danga.com/lj/cvsweb.cgi/livejournal/cgi-bin/ljprotocol.pl.diff?r1=1.66&r2=1.67
cvs rdiff -r1.30 -r1.31 livejournal/cgi-bin/ljviews.pl
http://danga.com/lj/cvsweb.cgi/livejournal/cgi-bin/ljviews.pl.diff?r1=1.30&r2=1.31
cvs rdiff -r1.5 -r1.6 livejournal/cgi-bin/talklib.pl
http://danga.com/lj/cvsweb.cgi/livejournal/cgi-bin/talklib.pl.diff?r1=1.5&r2=1.6
cvs rdiff -r1.33 -r1.34 livejournal/htdocs/talkpost.bml
http://danga.com/lj/cvsweb.cgi/livejournal/htdocs/talkpost.bml.diff?r1=1.33&r2=1.34
cvs rdiff -r1.30 -r1.31 livejournal/htdocs/talkpost_do.bml
http://danga.com/lj/cvsweb.cgi/livejournal/htdocs/talkpost_do.bml.diff?r1=1.30&r2=1.31
cvs rdiff -r1.39 -r1.40 livejournal/htdocs/talkread.bml
http://danga.com/lj/cvsweb.cgi/livejournal/htdocs/talkread.bml.diff?r1=1.39&r2=1.40

livejournal: doc change

Module Name: livejournal
Committed By: bradfitz
Date: Sun Jan 27 23:52:35 UTC 2002

Modified Files:
---------------
livejournal/doc: INSTALL.apache.txt

Log Message:
------------
I like this way more.
On my test machine, I have it listening on a dozen different IPs/ports for
different reasons. Now this rule always works.


To generate a diff of this commit:
cvs rdiff -r1.6 -r1.7 livejournal/doc/INSTALL.apache.txt
http://danga.com/lj/cvsweb.cgi/livejournal/doc/INSTALL.apache.txt.diff?r1=1.6&r2=1.7

livejournal: clustering -- memories & cleanups

Module Name: livejournal
Committed By: bradfitz
Date: Mon Jan 28 02:07:21 UTC 2002

Modified Files:
---------------
livejournal/cgi-bin: talklib.pl
livejournal/htdocs: create.bml talkpost.bml talkread.bml
livejournal/htdocs/tools: memadd.bml memories.bml

Log Message:
------------
- adding/browsing memories for clustered/non-clustered works now
- tons of little cleanups
- some anum omissions
- strictness in memadd.bml
- "this is just for debugging" note in create.bml's cluster selection


To generate a diff of this commit:
cvs rdiff -r1.6 -r1.7 livejournal/cgi-bin/talklib.pl
http://danga.com/lj/cvsweb.cgi/livejournal/cgi-bin/talklib.pl.diff?r1=1.6&r2=1.7
cvs rdiff -r1.14 -r1.15 livejournal/htdocs/create.bml
http://danga.com/lj/cvsweb.cgi/livejournal/htdocs/create.bml.diff?r1=1.14&r2=1.15
cvs rdiff -r1.34 -r1.35 livejournal/htdocs/talkpost.bml
http://danga.com/lj/cvsweb.cgi/livejournal/htdocs/talkpost.bml.diff?r1=1.34&r2=1.35
cvs rdiff -r1.40 -r1.41 livejournal/htdocs/talkread.bml
http://danga.com/lj/cvsweb.cgi/livejournal/htdocs/talkread.bml.diff?r1=1.40&r2=1.41
cvs rdiff -r1.7 -r1.8 livejournal/htdocs/tools/memadd.bml
http://danga.com/lj/cvsweb.cgi/livejournal/htdocs/tools/memadd.bml.diff?r1=1.7&r2=1.8
cvs rdiff -r1.10 -r1.11 livejournal/htdocs/tools/memories.bml
http://danga.com/lj/cvsweb.cgi/livejournal/htdocs/tools/memories.bml.diff?r1=1.10&r2=1.11

livejournal: consolecommand bug fix

Module Name: livejournal
Committed By: bradfitz
Date: Mon Jan 28 02:20:06 UTC 2002

Modified Files:
---------------
livejournal/cgi-bin: console.pl

Log Message:
------------
When consolecommand was used via protocol handler (running from interface,
which is in htdocs/), it was lazily loading the console command library
from the wrong place... see, from the web admin console, that runs from
bml, which is already in cgi-bin... where the console libraries are.

so yeah, this makes the path explicit.


To generate a diff of this commit:
cvs rdiff -r1.16 -r1.17 livejournal/cgi-bin/console.pl
http://danga.com/lj/cvsweb.cgi/livejournal/cgi-bin/console.pl.diff?r1=1.16&r2=1.17

livejournal: memories changes

Module Name: livejournal
Committed By: bradfitz
Date: Mon Jan 28 02:48:11 UTC 2002

Modified Files:
---------------
livejournal/htdocs/tools: memadd.bml memories.bml

Log Message:
------------
remove eventtime listing, since we can't load it anyway.
but make it part of the default subject.
later we'll add sort option: sort by memid or des.


To generate a diff of this commit:
cvs rdiff -r1.8 -r1.9 livejournal/htdocs/tools/memadd.bml
http://danga.com/lj/cvsweb.cgi/livejournal/htdocs/tools/memadd.bml.diff?r1=1.8&r2=1.9
cvs rdiff -r1.11 -r1.12 livejournal/htdocs/tools/memories.bml
http://danga.com/lj/cvsweb.cgi/livejournal/htdocs/tools/memories.bml.diff?r1=1.11&r2=1.12

livejournal: more DISABLED support

Module Name: livejournal
Committed By: bradfitz
Date: Mon Jan 28 02:53:21 UTC 2002

Modified Files:
---------------
livejournal/cgi-bin: talklib.pl
livejournal/doc: ljconfig.pl.txt

Log Message:
------------
let more things be disabled


To generate a diff of this commit:
cvs rdiff -r1.7 -r1.8 livejournal/cgi-bin/talklib.pl
http://danga.com/lj/cvsweb.cgi/livejournal/cgi-bin/talklib.pl.diff?r1=1.7&r2=1.8
cvs rdiff -r1.13 -r1.14 livejournal/doc/ljconfig.pl.txt
http://danga.com/lj/cvsweb.cgi/livejournal/doc/ljconfig.pl.txt.diff?r1=1.13&r2=1.14

livejournal: tellafriend

Module Name: livejournal
Committed By: bradfitz
Date: Mon Jan 28 03:28:06 UTC 2002

Modified Files:
---------------
livejournal/cgi-bin: ljlib.pl
livejournal/htdocs/tools: tellafriend.bml

Log Message:
------------
- clusterawareation of tellafriend
- added sanity check to ljlib function
- disabled support on tellafriend


To generate a diff of this commit:
cvs rdiff -r1.134 -r1.135 livejournal/cgi-bin/ljlib.pl
http://danga.com/lj/cvsweb.cgi/livejournal/cgi-bin/ljlib.pl.diff?r1=1.134&r2=1.135
cvs rdiff -r1.10 -r1.11 livejournal/htdocs/tools/tellafriend.bml
http://danga.com/lj/cvsweb.cgi/livejournal/htdocs/tools/tellafriend.bml.diff?r1=1.10&r2=1.11

livejournal: protocol & anum

Module Name: livejournal
Committed By: bradfitz
Date: Mon Jan 28 04:31:29 UTC 2002

Modified Files:
---------------
livejournal/cgi-bin: ljprotocol.pl talklib.pl
livejournal/htdocs: editjournal_do.bml

Log Message:
------------
- protocol handler now returns anum on editevent/postevent
(probably should for getevents also sometime ... people will want it)
- editjournal_do works now (broke it with anum addition)


To generate a diff of this commit:
cvs rdiff -r1.67 -r1.68 livejournal/cgi-bin/ljprotocol.pl
http://danga.com/lj/cvsweb.cgi/livejournal/cgi-bin/ljprotocol.pl.diff?r1=1.67&r2=1.68
cvs rdiff -r1.8 -r1.9 livejournal/cgi-bin/talklib.pl
http://danga.com/lj/cvsweb.cgi/livejournal/cgi-bin/talklib.pl.diff?r1=1.8&r2=1.9
cvs rdiff -r1.9 -r1.10 livejournal/htdocs/editjournal_do.bml
http://danga.com/lj/cvsweb.cgi/livejournal/htdocs/editjournal_do.bml.diff?r1=1.9&r2=1.10