Commit Graph

61 Commits

Author SHA1 Message Date
Mia
c6c6eb4044
Support changing namecolors through the loginserver (#2034)
* Support changing namecolors through the loginserver

* Update lib/dispatcher.lib.php
2022-11-30 16:32:25 -08:00
Guangcong Luo
0db27ee2d6 Improve documentation of $outPrefix 2021-11-15 18:38:20 -05:00
Mia
d5c2cf40d6
Remove friends list code (#1646) 2020-10-28 12:52:42 -07:00
Guangcong Luo
55b57799c0 Finish migrating website repository
This fixes up the last few remaining issues; from here on out,
pokemonshowdown.com should be served from `website/` with no
known problems.
2020-07-27 21:03:31 -04:00
Guangcong Luo
3988c4d726 Update paths for caches
This specifically moves `customcss/`, `userbitscache.html`, and
`news.inc.php` from `website/config/` to `config/`.
2020-07-27 16:56:19 -07:00
Annika
367ed82e56
Support configurable URLs (#1543) 2020-07-21 15:27:21 -07:00
Guangcong Luo
00a877333f Stop autodetecting serverid for loginserver rqs
The automatic server detection just loops through all registered
servers and tries each of them to find the correct one. This process
will hang if any registered server isn't responding to DNS queries,
which at the number we currently have, makes all servers not sending
serverid fail.

We now hard-require the Config.serverid setting, to prevent this
problem.
2020-06-27 12:46:38 -04:00
whales
3efb099c56 Don't error out for ladder ranks with a long input name (#1374) 2019-09-27 13:46:22 +09:30
Guangcong Luo
029b691be1
Add replay database code to version control (#1301)
This required a new architecture for serving replays from inside the
client repository, because that seems like a better call than
introducing yet another PS repository.

(Experience gives me the impression that separating repositories wasn't
a good idea, and we should be working to make PS more mono-repo-like,
rather than less.)

License for replay code is tentatively AGPLv3, although feel free to ask
for a more permissive license if you have plans to use it in an
open-source project that requires it.
2019-06-14 17:48:34 +09:00
Guangcong Luo
86a55ee61e Fix minor bug in dispatcher 2019-01-05 04:04:10 -05:00
Guangcong Luo
5b21cce99a Improve action.php
POSTing JSON data is now supported, since apparently Axios does that by
default: #1160

In addition, error messages should be more informative, for anyone else
trying to write a third-party client.
2018-11-14 21:49:40 -05:00
Guangcong Luo
2dc0f28e78 Use Node library for Google token validation
After lots of tries, the PHP code just couldn't be made to work...
2017-11-17 20:21:24 -05:00
Guangcong Luo
ab657d2511 Include server ID in replay data
This is to help the replay server determine how much to trust the info
uploaded.
2017-10-10 23:04:51 -04:00
Guangcong Luo
c5bc304522 Fix style in session library 2017-03-25 14:15:30 -04:00
Guangcong Luo
ecafe4b779 Save name capitalization changes
Name capitalization and spacing used to reset to their previous value
on login. Changes are now stored long-term.
2016-03-08 05:08:26 -05:00
Guangcong Luo
7d2ec99067 Don't check IPs for token-auth
Allows login server requests from non-matching IPs to go through when
the request is using token auth.

Affects certain request-proxying Node hosts such as c9.
2016-01-25 03:32:25 -05:00
Guangcong Luo
15e6d69fac Slightly more helpful error message in action.php 2016-01-16 04:14:13 -05:00
Guangcong Luo
09fa73f719 Remove serverid from NTBBLadder constructor
NTBBLadder no longer supports alternate servers, making it unnecessary.
2015-12-31 00:34:54 -05:00
Guangcong Luo
fe38cc3ead More consistent CORS support 2015-11-26 03:53:56 -05:00
Guangcong Luo
bc8daf62e4 Ladder refactor 2015-11-25 17:36:28 -05:00
Guangcong Luo
3f8ffa684f Support new challstr protocol
See Zarel/Pokemon-Showdown@d5c622b493

New system is backwards-compatible with old one. This also slightly
refactors some other stuff, for an overall simpler system.
2015-06-28 00:50:17 -04:00
Guangcong Luo
f525c08b49 Fix support for autodetecting server for ladders 2014-04-11 02:51:44 -05:00
Guangcong Luo
4f3f526c61 Fix crash in IP reporter 2014-04-02 22:58:13 -05:00
Guangcong Luo
6f14a44b55 Report IPs from unregistered servers
Right now, unregistered servers often get unclear error messages
about why laddering and replay saving doesn't work. This commit
attempts to clarify those error messages.

In addition, servers that make requests from different IPs from
their registered IP didn't have an easy way to fix. Reporting
IPs should make it clearer which IP they need to register.
2014-04-02 00:39:16 -05:00
Guangcong Luo
2be6563318 Elo ladder 2014-01-15 12:37:08 -06:00
Guangcong Luo
77e8d12190 New replay uploading system 2013-11-30 00:54:42 -06:00
Quinella
7e9149887d Friendlist: serverside client code (so that friends can be added etc.) 2013-11-12 23:13:57 +01:00
Guangcong Luo
b566aa91b0 Wordfilter for replay uploads 2013-09-14 18:43:19 -05:00
Guangcong Luo
0a0a64990f Yet another change to the MMR formula
It's now (2*rpr+r)/3
2013-08-18 16:17:39 -05:00
Guangcong Luo
4b65f40779 MMR is now projected rating 2013-08-14 00:47:34 -05:00
Cathy J. Fitzpatrick
63791dabd2 Correct check for all-numeric name 2013-06-20 22:34:19 -05:00
Cathy J. Fitzpatrick
0dbd829ec6 Rename some globals to avoid namespace collisions 2013-06-03 15:24:50 -06:00
Cathy J. Fitzpatrick
983c94d1df Implement change password dialogue 2013-06-01 01:16:26 -05:00
Cathy J. Fitzpatrick
0a0e5f011b Usernames must contain at least one letter 2013-05-28 23:32:20 -05:00
Cathy J. Fitzpatrick
685910046d New method for invalidating custom CSS 2013-05-25 04:38:42 -05:00
Cathy J. Fitzpatrick
a38be39eb0 Use mb_strlen rather than strlen 2013-05-01 17:27:20 -07:00
Cathy J. Fitzpatrick
e19f727226 ipidentification is now always enabled 2013-04-26 07:49:15 -06:00
Cathy J. Fitzpatrick
a9f7f3356c Remove unused sessiontoken 2013-04-25 03:29:12 -06:00
Cathy J. Fitzpatrick
e52a0339ad Safer approach to updating the stats 2013-04-22 19:53:01 -07:00
Cathy J. Fitzpatrick
bf740992fb Fix include path 2013-04-22 17:56:13 -07:00
Cathy J. Fitzpatrick
17b8917d0b Update PO userstats whenever the main server reports userstats 2013-04-22 18:35:28 -06:00
Cathy J. Fitzpatrick
4e35bab1c5 Drop deprecated ladderformatgetmmr action 2013-04-20 05:08:00 -06:00
Cathy J. Fitzpatrick
6b9d5e4cf2 Drop the action name from JSON output in action.php 2013-04-17 16:33:12 -06:00
Cathy J. Fitzpatrick
b701edc906 Send correct Content-Type header in action.php 2013-04-17 16:30:22 -06:00
Cathy J. Fitzpatrick
3021e2aca5 More thorough replay upload validation 2013-04-15 17:48:22 -06:00
Cathy J. Fitzpatrick
371a1d8c7f Validate battle/format IDs in replay uploading 2013-04-15 17:29:11 -06:00
Cathy J. Fitzpatrick
9b26fcc218 Correct domain for showdown_username cookie 2013-04-13 19:38:59 -06:00
Cathy J. Fitzpatrick
e955c116c0 Replace "Change name" button by "Log out" button 2013-04-13 19:32:17 -06:00
Cathy J. Fitzpatrick
b09e853b3d Refactor authentication code and drop support for old scheme
This drops support for the pre-challenge-response authentication scheme
(i.e. the scheme in use before Zarel/Pokemon-Showdown@7dbd8cfec5 on
February 8, 2013), and, by doing so, simplifies quite a bit of the
authentication code.

In particular, it is no longer necessary to make any database queries in
index.php, which reduces our database use significantly and also moves us
closer to the goal of the index page being static HTML.
2013-04-07 02:26:30 -06:00
Cathy J. Fitzpatrick
9d811c697a Remove obsolete crossdomain sid sharing 2013-04-06 04:38:43 -06:00