Skip to content

Any time we use pass a callsign over http we need to encodeURIComponent()#1096

Draft
alanhargreaves wants to merge 1 commit into
accius:Stagingfrom
alanhargreaves:issue-1095
Draft

Any time we use pass a callsign over http we need to encodeURIComponent()#1096
alanhargreaves wants to merge 1 commit into
accius:Stagingfrom
alanhargreaves:issue-1095

Conversation

@alanhargreaves

Copy link
Copy Markdown
Collaborator

What does this PR do?

Any time we pass a callsign to the server API in useRBN.js we need to encode the callsign so callsigns with suffixes like /P don't screw things up.

Type of change

  • Bug fix
  • New feature
  • Performance improvement
  • Refactor / code cleanup
  • Documentation
  • Translation
  • Map layer plugin

How to test

Watch an RBN skimmer for a known CW op operating with a suffix like /P that has also spotted in either DX Cluster or an ActivatorPanel type spot and verify that we get the proper location.

Checklist

  • App loads without console errors
  • Tested in Dark, Light, and Retro themes
  • Responsive at different screen sizes (desktop + mobile)
  • If touching server.js: caches have TTLs and size caps (we serve 2,000+ concurrent users)
  • If adding an API route: includes caching and error handling
  • If adding a panel: wired into Modern, Classic, and Dockable layouts
  • No hardcoded colors — uses CSS variables (var(--accent-cyan), etc.)
  • No .bak, .old, console.log debug lines, or test scripts included

@alanhargreaves

Copy link
Copy Markdown
Collaborator Author

I'm running this locally to verify that it addresses the issue. If to this evening, I expect to see VK2IO/P activating in the morning on CW.

@alanhargreaves

Copy link
Copy Markdown
Collaborator Author

ok it looks like /api/callsign does not check our caches. It probably should.

@accius accius left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct fix. Line 280 was the only callsign-bearing fetch in this file still interpolating raw, the user-callsign spots fetch at line 244 already runs through encodeURIComponent, so this brings the location lookup in line with it. A skimmer callsign with a / portable suffix would otherwise break the path segment.

One thing: this is still marked draft. Flip it to ready when you are happy with it and it can go in.

K0CJH

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.

[BUG] RBN should query spot/cluster caches before querying qrz for location

2 participants