Cathy J. Fitzpatrick
36b3f173dd
Note that node v0.10.0 and v0.10.1 are broken
2013-03-25 22:53:42 -06:00
Cathy J. Fitzpatrick
3db30bb344
Remove the requireGracefully function
2013-03-24 23:23:42 -06:00
Cathy J. Fitzpatrick
5265a78b07
Automatically run npm install or npm update if necessary
2013-03-24 23:18:06 -06:00
Cathy J. Fitzpatrick
133afb2619
Add check for outdated version of sugar to app.js
2013-03-24 22:40:59 -06:00
Cathy J. Fitzpatrick
11694d5b3d
Update URIs to *.psim.us where appropriate
2013-03-22 03:24:38 -06:00
Cathy J. Fitzpatrick
321236215f
Fix presumably accidental global youUser in app.js
2013-03-10 12:25:55 -06:00
Cathy J. Fitzpatrick
05b769d9af
Changes re: client no longer running arbitrary server CSS/JavaScript
...
As of Zarel/Pokemon-Showdown-Client@5950a2dbbd , the client will no
longer run arbitrary JavaScript or `style` tags received from the
server. This commit makes various changes in response to this:
- Various chat commands now send `class` attributes rather than
`style` attributes.
- The /redirect command is removed.
- The /banredirect command is removed.
2013-02-12 02:56:59 -07:00
Cathy J. Fitzpatrick
22770b0117
Fix setuid feature
...
The call to setuid() was previously after the simulator and verifier
processes were spawned, so both those processes always ran as the user
who started the process (which would have been `root` if the setuid
feature was being used), rather than the setuid user. In particular,
this meant that the >>> battle dev console could be used to execute
arbitrary code as root (if the server was started as root).
This commit makes the setuid() feature work as advertised, but it
still should not be used for the reasons given in config-example.js.
Instead of using setuid, start the server as an unprivileged user and
use port forwarding (e.g. iptables ) to use the port(s) you prefer.
2013-02-09 19:45:29 -07:00
Cathy J. Fitzpatrick
cd5954d32c
Delete call to nodetime.profile
2013-02-09 04:29:20 -07:00
Cathy J. Fitzpatrick
21f7b105d3
Remove some unnecessary code from app.js
2013-02-09 04:28:01 -07:00
Cathy J. Fitzpatrick
4192289269
Refactor: Don't require client to send username in join message
2013-02-08 22:33:41 -07:00
Cathy J. Fitzpatrick
627ca0d38d
New login server public key
2013-02-08 01:13:12 -07:00
Cathy J. Fitzpatrick
7dbd8cfec5
Implement challenge-response authentication
2013-02-08 00:52:42 -07:00
Cathy J. Fitzpatrick
b5f144a9aa
Remove unnecessary code from app.js
2013-02-01 22:07:37 -07:00
Cathy J. Fitzpatrick
9a1c2679e1
Add feature to watch config file for changes
2013-02-01 22:01:20 -07:00
Cathy J. Fitzpatrick
0d67aa1f35
Display helpful message for missing module
...
This should help users understand that they need to run npm install.
2013-01-21 21:15:20 -07:00
Guangcong Luo
d361c0cbf1
Increase login server timeout, might decrease ladder strain
2013-01-02 17:10:08 -08:00
Guangcong Luo
45b5dc0043
Configurable batch time for ladder queries
2013-01-02 16:39:41 -08:00
Guangcong Luo
82fc0142dd
Emergency ladder enabling/disabling functions
2013-01-02 07:59:38 -08:00
Guangcong Luo
578550908f
Better error messages for ladder server issues
2012-12-16 16:57:25 -08:00
Guangcong Luo
fd512f4fc4
More efficient toId implementation
2012-12-14 19:05:30 -08:00
Guangcong Luo
cae58c2fde
More consistent name validation
2012-12-14 18:58:18 -08:00
Guangcong Luo
c9045cb538
Update link for hosting a server
2012-12-07 02:44:51 -08:00
Guangcong Luo
95a195b83b
Handle the X-Forwarded-For header securely
...
Namely, don't trust it unless it's on a list of secure IPs
and trust nothing by default.
2012-11-25 16:47:05 -08:00
小太
a80a77cac1
Fix whitespace issues
2012-10-21 19:30:50 +11:00
Guangcong Luo
52d57a52c1
Remove a lot of code from the old protocol
2012-10-02 22:45:09 -07:00
Bill Meltsner
4d2907d2ce
Check the user token's type to ensure it's a string, and thus won't break anything that assumes it is.
2012-09-13 00:22:59 -07:00
Guangcong Luo
955fe3948e
Reduce the login server timeout to 10 seconds
...
(this is on the off chance that a login server stall is causing our lag spikes)
2012-08-17 21:43:08 -07:00
Guangcong Luo
c2d09f55b2
New protocol - significantly reduced network usage
2012-08-14 20:02:56 -07:00
Guangcong Luo
ea746cf2ca
Don't crash on malformed JSON
2012-08-14 16:59:34 -07:00
Guangcong Luo
59959ce24e
Chat commands for most user actions
...
- we're moving to a new protocol! wheee!
2012-08-12 13:44:59 -07:00
Guangcong Luo
641f4c153c
Support engine.io
2012-08-10 18:55:12 -07:00
Guangcong Luo
91f3f20364
Comment out some unnecessary logging
2012-08-10 09:54:05 -07:00
Guangcong Luo
1d31929db8
Time out requests and responses after 2 seconds each
2012-08-08 23:50:40 -07:00
Guangcong Luo
efc9d77f58
Time out requests after 3 minutes
2012-08-08 22:37:33 -07:00
Guangcong Luo
1b5d406fa3
Some improvements to login/ladder server connection
2012-08-08 13:20:11 -07:00
Guangcong Luo
47c7e02464
Batched ladder requests
2012-08-07 19:21:53 -07:00
Guangcong Luo
2ab4f287db
New request API
...
(preparation for batched requests)
2012-08-05 00:10:04 -07:00
Guangcong Luo
445b840411
Disconnect is now handled separately
2012-08-04 00:56:44 -07:00
Guangcong Luo
878a3f9b11
Implement the disconnect event correctly
2012-08-04 00:51:45 -07:00
Guangcong Luo
4831e68a8c
Multi-process battles!
...
Battles now occur in a separate process.
Hopefully, this results in a substantial increase in network stability.
WARNING: Battle crashes are now practically unrecoverable.
2012-08-01 13:48:58 -07:00
Guangcong Luo
31e642c5a2
Rename simulator.js to battles.js
2012-07-31 19:48:09 -07:00
Guangcong Luo
a230425dcd
Fixes to verifier
2012-07-29 14:23:05 -07:00
Patrick Roberts
2325ed9c9a
connection grabs IP from behind proxy and fs stream doesn't throw exception now
2012-07-28 23:22:36 -05:00
Guangcong Luo
b801be60c0
Normalize set variables
2012-07-28 17:28:42 -07:00
Guangcong Luo
8b0ee28f21
Hopefully this will make request limiting work properly
2012-07-23 23:30:15 -07:00
Guangcong Luo
8c7449d441
Try to limit the number of open requests
2012-07-23 23:25:49 -07:00
Guangcong Luo
1dc63e446f
Even fewer console messages
2012-07-23 23:25:49 -07:00
Guangcong Luo
ba78f59052
Continue cutting down on what we print to console
2012-07-23 13:36:11 -07:00
Guangcong Luo
5df400c39e
Support Node 0.6 and 0.8
2012-07-20 23:53:57 -07:00