Commit Graph

117 Commits

Author SHA1 Message Date
Cathy J. Fitzpatrick
f0fde921ec Changes to action.php for challenge-response authentication 2013-02-07 23:22:13 -07:00
Guangcong Luo
1a0ae1f17f pokedex.php moved - useful test page for utilichart.js 2013-02-07 16:35:33 -08:00
Guangcong Luo
41a6b2d96b Pokemon with formes work correctly in teambuilder now 2013-02-07 16:33:57 -08:00
Cathy J. Fitzpatrick
f7adbee232 More changes to cached index.php logging
- record lag time in the log
- use an <img> tag rather than an AJAX request to reduce false
  positives caused by slow internet
2013-02-07 13:54:24 -07:00
Marty-D
6c9c6ef9f7 Fix Skull Bash's message. 2013-02-07 13:15:48 -05:00
Marty-D
538a0afe17 Add the last Pledge move messages. 2013-02-07 12:06:32 -05:00
Cathy J. Fitzpatrick
b15904fe12 Changes to chat history feature
This commit revises the chat history feature to work like my
terminal emulator. Specifically, when reviewing the history
with up/key, changes to the lines are now saved. This makes
the feature significantly more useful and also prevents
annoyance if the user presses up when typing a line, because
the user can now just press down to get the line back (and vice
versa), as opposed to the line being gone.
2013-02-07 03:51:48 -07:00
Cathy J. Fitzpatrick
ddaeb974e3 Track clicks of the 'Report bug' link
This might be an interesting statistic.
2013-02-07 02:23:29 -07:00
Cathy J. Fitzpatrick
7fe3af122b Fix for shift handling in chatbox
I used pull request #11 as the base for @9b976cf9b8, but I forgot
to fix this aspect of it.
2013-02-07 01:41:57 -07:00
Cathy J. Fitzpatrick
9b976cf9b8 Implement chat history recall with up/down keys
This commit implements a feature commonly found in IRC clients,
wherein the user can press the up key to recall previously sent
messages (and can press the down key to cycle back the other
direction in the history).

This commit is similar to pull request #11, except that this
implementation works properly.
2013-02-07 01:26:42 -07:00
Cathy J. Fitzpatrick
1be6d82e34 Disable web access to .git directory 2013-02-06 23:40:29 -07:00
Cathy J. Fitzpatrick
0964746432 Don't use actionphp variable in index.php 2013-02-06 22:37:43 -07:00
Cathy J. Fitzpatrick
7a50b31b6b More changes to cached index.php logging
- check timestamp in index.php rather than sim.js to reduce the chance
  of false positives caused by the user's internet connection being
  slow or the user's clock being slightly wrong

- require timestamp logging to be a POST request
2013-02-06 22:36:32 -07:00
Cathy J. Fitzpatrick
877594bc35 Remove 'Connecting to login server...' message
The initialisation of the client no longer makes an AJAX request
to the login server, so this message is not applicable anymore.
2013-02-06 22:10:46 -07:00
Cathy J. Fitzpatrick
b15a9c9561 Use different set of headers to indicate no caching
Use headers from http://stackoverflow.com/questions/49547/making-sure-a-web-page-is-not-cached-across-all-browsers
2013-02-06 19:25:20 -07:00
Cathy J. Fitzpatrick
3e86a976dd Changes to cached index.php logging
- use human-readable times
- log user agent
2013-02-06 19:00:34 -07:00
Cathy J. Fitzpatrick
d5cc683e32 Fix typo 2013-02-06 18:43:07 -07:00
Cathy J. Fitzpatrick
22138d3e25 Log cases where user has cached index.php
In addition, if the user has a cached index.php, we no longer make a
special request to action.php?act=upkeep.
2013-02-06 18:40:33 -07:00
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