Commit Graph

3384 Commits

Author SHA1 Message Date
Cathy J. Fitzpatrick
2acc89748a Each server now gets its own session
This commit implements the following:

- each server now has a separate session with a 'sid' cookie
  scoped to /~~server:port

- 'sid' cookies are now HTTP-only and not accessible in JavaScript

- the showdown_token cookie is removed

Together, these changes fix various XSS attacks.
2013-02-02 19:37:57 -07:00
Cathy J. Fitzpatrick
92be502239 Add support for permanent nameTaken error 2013-02-02 16:29:03 -07:00
Guangcong Luo
c5f0f6f001 Only show username rules while forcerenaming 2013-02-02 14:49:09 -08:00
Cathy J. Fitzpatrick
b3416fc983 Include name rules on rename overlay
The name rules have been copied from http://www.pokemonshowdown.com/rules
2013-02-02 04:15:15 -07:00
Cathy J. Fitzpatrick
46f0368215 Add rows attribute to teambuilder <textarea>s
Firefox renders the height of a <textarea> based on the `rows`
attribute, which was not previously specified, causing the <textarea>
in the teambuilder to be very short. This commit specifies a
(somewhat arbitrary) `rows` attribute so that the <textarea> has
some more height.
2013-02-02 00:04:58 -07:00
Cathy J. Fitzpatrick
2a88bcaa5d Revert consolidation of getName and getLowerName 2013-02-01 17:58:18 -07:00
Cathy J. Fitzpatrick
54c80f0247 Don't throw from getHighlight 2013-02-01 17:18:15 -07:00
Cathy J. Fitzpatrick
63f62b3991 Add highlight notification 2013-02-01 17:11:40 -07:00
Marty-D
fe3bd25b5c Fix many messages. 2013-02-01 16:00:02 -05:00
Guangcong Luo
e81b208b5e Feedback for highlight commands 2013-02-01 11:20:19 -08:00
Guangcong Luo
e73721b5da Nicer highlight color 2013-02-01 11:17:16 -08:00
Guangcong Luo
0d3dd1b4b1 Merge pull request #5 from Joimer/patch-1
Adding highlighting words
2013-02-01 11:13:12 -08:00
Cathy J. Fitzpatrick
ed5a7db386 Add ! and # users to the sort order
Users whose names are prefaced by ! (mute) or # (namelock) were
not included in the rank sort order, causing unusual sort results.
2013-02-01 04:14:04 -07:00
Cathy J. Fitzpatrick
51712746c8 Disable web access to backup directory
This directory should probably just be deleted entirely, but for
now I am just disabling web access to it.
2013-02-01 01:58:45 -07:00
yenatch
77c4293942 Add (Hi) Jump Kick crash message 2013-02-01 02:56:10 -05:00
yenatch
b979cc3582 Consolidate Pokemon.getName & Pokemon.getLowerName 2013-02-01 02:55:06 -05:00
yenatch
d1fe1db400 Fix 'attack missed!' message 2013-02-01 02:30:41 -05:00
Cathy J. Fitzpatrick
5ae66a78aa Changes for Railgun 2013-01-31 22:33:00 -07:00
Joim
7dd40a7d3b Adding highlighting words
Added highlighting words:
Users may now use the new highlight commands:
-Use /highlight add, word to add a highlighting word.
You might add several words separated with commands.
-In a likewise fashion, /highlight delete, word deletes words.
-Using /highlight delete with no words will delete all.
-/highlight show or list will show all current highlight words.
-By default no word is added to highlights.
-Words are escaped
2013-01-31 21:21:15 +01:00
Cathy J. Fitzpatrick
1208dee10f Verify that source IP is valid for server requests
Currently, server authentication for updating the ladder and for
uploading replays is done by comparing the hash of the token provided
by the server to the hash on record. This commit adds a second layer
of authentication by also verifying that the request actually
originates from the Pokemon Showdown server in question.

For now, I have also maintained the server token check as a form of
two-factor authentication.
2013-01-31 11:31:35 -07:00
Cathy J. Fitzpatrick
e3be0b3ea3 Remove unused code 2013-01-31 05:41:32 -07:00
Cathy J. Fitzpatrick
b696d366bb Add missing file: jquery-1.9.0.min.js 2013-01-31 02:58:25 -08:00
Cathy J. Fitzpatrick
12b3b59ed0 Break long words in chat 2013-01-31 02:57:27 -08:00
Cathy J. Fitzpatrick
b8daba264f Fix theoretical IE6 XSS 2013-01-31 01:38:21 -07:00
Cathy J. Fitzpatrick
5a26bc4fdb Fix XSS in getassertion 2013-01-30 22:49:51 -07:00
Marty-D
76ddd847cf Add After You and Quash messages. 2013-01-30 14:46:21 -05:00
Cathy J. Fitzpatrick
676df137c5 Update link in README.md 2013-01-30 07:06:34 -07:00
Cathy J. Fitzpatrick
9e28dc7e7d Include hostname in assertion to avoid vulnerability 2013-01-30 06:25:32 -07:00
Cathy J. Fitzpatrick
5c2160d875 Remove glickotest and laddertest features 2013-01-30 04:16:48 -07:00
Cathy J. Fitzpatrick
b630ff5c49 Remove sekrit2q53mkuser feature 2013-01-30 04:11:14 -07:00
Guangcong Luo
b5f7479ab4 Upgrade jQuery to 1.9.0 2013-01-29 20:01:48 -08:00
Cathy J. Fitzpatrick
a672294ea0 Fix bug in prefs 2013-01-29 16:27:42 -07:00
Guangcong Luo
6712b24913 Fix error when a spread move is marked missed 2013-01-29 14:52:37 -08:00
Cathy J. Fitzpatrick
560d71cecd Introduce self rather than using this in prefs
This doesn't actually matter here, but it provides greater
consistency with the style used in the codebase.
2013-01-29 15:40:27 -07:00
Cathy J. Fitzpatrick
f36d8db188 Refactor timestamps and prefs
- battle logs no longer have timestamps
- getTimestamp is moved to a property of the Lobby function
- the prefs global variable is replaced by a prefs API
2013-01-29 15:31:59 -07:00
Guangcong Luo
e4c3c621fa Stopgap fix to prevent replay crashing 2013-01-29 13:44:16 -08:00
Cathy J. Fitzpatrick
0890dae6c6 Set timestamps off by default
In order to preserve the previous status quo for now, this
commit turns timestamps off by default. They can be turned on
using /timestamps minutes or /timestamps seconds.
2013-01-29 05:39:19 -07:00
Cathy J. Fitzpatrick
310d8a806b Disable timestamps for past log sent from server
The past log sent from the server when joining a room does not
contain information about when the messages were sent, so we
do not show a timestamp for those messages.
2013-01-29 00:41:22 -07:00
Cathy J. Fitzpatrick
b6a9c9d3d0 Implement timestamps; save prefs in localStorage
This commit implements timestamp functionality in the lobby chat,
in private messages, and in battle chats. Timestamps are controlled
by a /timestamps command, which has three legal invocations:

    /timestamps off
        turns off timestamps

    /timestamps minutes
        show timestamps of the form [hh:mm]

    /timestamps seconds
        show timestamps of the form [hh:mm:ss]

For now, the default setting is /timestamps minutes. If this proves
unpopular, it can be changed. The timestamp preference is stored in
localStorage and does not have to be set every time.
2013-01-29 00:10:44 -07:00
Guangcong Luo
a1b11de299 Merged Leech Seed animation 2013-01-28 19:53:12 -08:00
Guangcong Luo
132c5627a8 Uproar messages 2013-01-28 17:22:39 -08:00
The Immortal
27d4a21d48 Typo 2013-01-29 00:04:35 +04:00
The Immortal
c4f29f6499 Update a few messages
- Add Guard Swap and Heart Swap
- Fix Spite
2013-01-29 00:01:44 +04:00
The Immortal
ca3ae00669 Add Freeze Shock -prepare message 2013-01-28 21:03:49 +04:00
Guangcong Luo
fa65b1b2d0 Fix crash in teambuilder export
(crash occurs with a set with no moves)
2013-01-28 06:06:08 -08:00
Cathy J. Fitzpatrick
f0583b1cfe Revise warning message to mention localStorage 2013-01-28 06:56:56 -07:00
Cathy J. Fitzpatrick
e4917fa448 Add warning about clearing cookies
Teams are stored in localStorage. Most browsers appear to clear
localStorage as part of clearing cookies. Very often, users
inadvertently delete their teams when they clear their cookies.
This message will not prevent all instances of this, but it
will at least decrease the chance of it happening.
2013-01-28 06:51:14 -07:00
Cathy J. Fitzpatrick
66e9e78bf1 Specify custom name colour for myself
I would have followed the pattern of specifying a hash, but my
shade of pink is not within the colour space spanned by the
normal algorithm (the proof of that claim is left as an exercise
to the reader), so it was necessary to hardcode the colour.
2013-01-28 03:58:33 -07:00
Cathy J. Fitzpatrick
fa05e003b9 Add shift+tab function for navigation
After the introduction of the tab complete feature, the tab
key can no longer be used to navigate away from the chatbox.
This commit adds a shift+tab function to navigate away from
the chatbox, rather than tab completing a name.
2013-01-27 23:03:55 -07:00
Marty-D
9b9bfaf9be Add messages for partial-trapping moves. 2013-01-27 20:18:57 -05:00