Commit Graph

99 Commits

Author SHA1 Message Date
Cathy J. Fitzpatrick
2272b6dcab Cosmetic fix to testclient.html
This doesn't actually matter, but it makes more sense to use the
correct timestamp.
2013-02-06 17:54:27 -07:00
Cathy J. Fitzpatrick
599360c363 Changes for browsers that cache index.php
If the browser uses a cached version of index.php more than 50
seconds old, we now make the AJAX request to action.php?act=upkeep.
2013-02-06 17:47:05 -07:00
Cathy J. Fitzpatrick
0ccaf286ce Eliminate initial AJAX request to login server
Instead of making an AJAX request to action.php?act=upkeep, this
commit now includes the initial token directly in index.php.
2013-02-06 17:08:32 -07:00
Cathy J. Fitzpatrick
417d95c392 Server tokens are now optional for ladder updates
As of this commit, if a registered server does not provide us with
a server token, authentication for `ladderupdate` is based purely on
the IP address of the server. This technically also applies to
the `prepreplay` action, but only the main server can use that at
this time, so that does not actually change anything.
2013-02-06 16:34:43 -07:00
Cathy J. Fitzpatrick
87b4712545 Revise testclient.html for safe JSON
This commit adds support for 'config data' that begins with a ']'
character so that output from the upkeep page can be copied directly
without having to manually remove the ']' prefix.
2013-02-06 14:15:19 -07:00
Cathy J. Fitzpatrick
83fe1d5b72 Don't return valid JavaScript from action.php
This avoids an attack where a malicious webpage contains

  <script id="data" type="application/json"
    src="http://play.pokemonshowdown.com/~~showdown/action.php?act=upkeep"/>

The webpage could then read the value of the `data` element using
standard DOM methods in order to steal the user's login assertion
and login as the user on the `showdown` server.
2013-02-04 20:42:38 -07:00
Cathy J. Fitzpatrick
ce3d876e1a Revise wording of timestamps message for consistency 2013-02-04 06:36:43 -07:00
Joim
8f4f2c045d Add feedback to timestamps
Added a feedback message to users when they configue the timestamps.
2013-02-04 14:32:44 +01:00
Joim
6dd067a6ef Configure timestamps for PMs and lobby separately
Improve timestamps so they can be configured separatedly for
PMs and lobby chat.

Cathy J. Fitzpatrick <cathy@cathyjf.com> revised this commit to
fix a number of bugs.
2013-02-04 02:29:46 -07:00
Guangcong Luo
ee4bdc0997 Fix for the z-index change 2013-02-04 00:37:07 -08:00
Guangcong Luo
c9c6c78119 Corretly z-index pokemon in doubles 2013-02-04 00:00:49 -08:00
Cathy J. Fitzpatrick
29298e97a8 Add notification for new PM 2013-02-03 21:14:41 -07:00
Cathy J. Fitzpatrick
44b5f3cde0 Really fix link 2013-02-03 04:34:58 -07:00
Cathy J. Fitzpatrick
a01337d134 Fix link in README.md 2013-02-03 04:32:18 -07:00
Cathy J. Fitzpatrick
07fd44afb7 Update link in URI 2013-02-02 19:43:34 -07:00
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