Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client: escape dots in URL regex #2243

Merged
merged 1 commit into from
Apr 13, 2024
Merged

client: escape dots in URL regex #2243

merged 1 commit into from
Apr 13, 2024

Conversation

laggron42
Copy link
Contributor

@laggron42 laggron42 commented Apr 12, 2024

This line looks for URLs without a port specified and sets the default port of 8000. However, in the case of IP subdomains (such as 127.0.0.1-12345.psim.us), the port 12345 is overwritten because the - is ignored by the unescaped dot.

This PR escapes the dots forming the IP address and ensures the port is not being overwritten when specified.

Tested in the console's browser:
image

@Zarel Zarel merged commit d352c0b into smogon:master Apr 13, 2024
1 check passed
@Zarel
Copy link
Member

Zarel commented Apr 13, 2024

Thanks!

Regular-Pokemon-Trainers-League added a commit to Regular-Pokemon-Trainers-League/pokemon-showdown-client that referenced this pull request Jul 19, 2024
* Support new ability flags

* Update HiZo Credits (smogon#2223)

* Teambuilder: Provide Smogon Dex resources when building teams

* Teambuilder: Fix target on Smogon links

* Teambuilder: Don't try to load resources when they're already cached

* Teambuilder: Cache failures for formats without resources

* Modify CSS for accessibility

* Rules: Add Korean translation (smogon#2221)

Credits to igeu  , xerneas9050 and dhwna for the translation, aegii for the formatting.

* Remove a certain someone from credits

Been spending some time processing the last decade of my life, including reading
some old logs from the period where this user was banned, and I've decided that
I have to make this commit to be able to move on.

* Add package-lock.json

* Remove unnecessary jabs at PO, which doesn't even exist anymore

* One more

* Improve dark mode checkboxes

* Let's Go: Support itemless megas (smogon#2233)

* Teambuilder: Show Restricted Legendaries for VGC/BSS Reg G (smogon#2239)

* Add client support for Random Meta of the Decade

* AFD Mode: Fix the ability to turn it off

* Add support for adding badges in battle (smogon#2235)

* Add support for adding badges in battle

* oops

Forgot these needed to be below the avatar per latest spec, not above

* Move |badge| message handling to battle.ts

* Update play.pokemonshowdown.com/src/battle.ts

Co-authored-by: Karthik <[email protected]>

* Style button on ladder page, also add custom badges for ou/rands

* change some badge filename stuff

* more css stuff, final version

---------

Co-authored-by: Karthik <[email protected]>

* Support rematching with custom rules (smogon#2234)

* Teambuilder: Add EV optimization checker (smogon#2240)

---------

Co-authored-by: pyuk-bot <[email protected]>

* Fix optimizer output when new spread has a 0 (smogon#2241)

* Teambuilder: Generate user samples from boxes (smogon#2226)

* client: escape dots in URL regex (smogon#2243)

* Changes for all of the s13 buffs.

* Updates for S13

* lots of fixes including for replays which should be moved to the main RPTL branch.

* Clarify 2D/3D Model Options (smogon#2244)

* Main menu: Add a button to the partner selection input for partner formats

* Add SSB client support (smogon#2245)

* ssb support

* SSB

* teehee

* poop

* more tooltip things

* Fix tooltips

* ok support

* More tooltip updates

* last changes

* Fix build

* Updates fixing announcer and trusted external sites

* Fix past gen tooltips (smogon#2247)

* CAP: Add Chuggalong minisprite index

* SSB: Client-side balance patch changes (smogon#2250)

* SSB: Client-side balance patch changes

* more changes

* oops

* Mark more evolution items as bad

* Fix tooltips getting cleared when using switch moves (smogon#2251)

* Override Fling and Natural Gift data for items in past gens (smogon#2252)

* Teambuilder: Update Smogdex links

* Add Psychic Noise animation (smogon#2254)

* Add Psychic Noise animation

* Satisfy linter

* Replays: Fix More Replays button on mobile (smogon#2255)

* Add Elo filter 1000 (smogon#2249)

PR for https://www.smogon.com/forums/threads/give-an-option-for-1000-minimum-elo-in-the-battles-tab-to-filter-out-challenge-battles.3743305/

* Properly display legal egg moves in teambuilder (smogon#2256)

* Include smogtours in "server down" message

* Add teambuilder support for BW 1 (smogon#2257)

* Fix crash in Replays

* Fix teambuilder move display for formes (smogon#2258)

* Fix teambuilder move display for formes

https://www.smogon.com/forums/threads/bug-report-teambuilder.3746541/
This bug was caused by my assumption that the client gets changesFrom the same way the server does.

* Update battle-dex-search.ts

Linter got upset

* Fix Ogerpon mask BP tooltip (smogon#2259)

* Fix crash (client) (smogon#2260)

* Point bug reports redirect to the subforum

* Fix client sending the wrong team to the server in some cases (smogon#2206)

* Convert noSketch to move flag (smogon#2261)

* Chat: Support nameless /html messages (smogon#2263)

* Teambuilder: Don't recommend 0 Atk IVs with Tera Blast

* Fix ???-type icon loading on type change animations

* Fix getAllyAbility for Gen < 7 (smogon#2264)

* Fix paralysis tooltips in Gens I-II

* Updates before cleanup.

* Removing buffed pokemon

---------

Co-authored-by: Karthik99999 <[email protected]>
Co-authored-by: Leonard Craft III <[email protected]>
Co-authored-by: Hisuian Zoroark <[email protected]>
Co-authored-by: Mia <[email protected]>
Co-authored-by: Lionyx <[email protected]>
Co-authored-by: Christopher Monsanto <[email protected]>
Co-authored-by: Guangcong Luo <[email protected]>
Co-authored-by: Karthik <[email protected]>
Co-authored-by: Kris Johnson <[email protected]>
Co-authored-by: Andrew Werner <[email protected]>
Co-authored-by: pyuk-bot <[email protected]>
Co-authored-by: tofa <[email protected]>
Co-authored-by: Auguste Charpentier <[email protected]>
Co-authored-by: Distrib <[email protected]>
Co-authored-by: Marty-D <[email protected]>
Co-authored-by: shrianshChari <[email protected]>
Co-authored-by: dot-Comfey <[email protected]>
Co-authored-by: Earl Joves <[email protected]>
shrianshChari pushed a commit to shrianshChari/pokemon-showdown-client that referenced this pull request Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants