MCPcopy Index your code
hub / github.com/actions/setup-java / validatePaginationUrl

Function validatePaginationUrl

src/util.ts:248–259  ·  view source on GitHub ↗
(
  url: string,
  allowedOrigin: string
)

Source from the content-addressed store, hash-verified

246}
247
248export function validatePaginationUrl(
249 url: string,
250 allowedOrigin: string
251): boolean {
252 try {
253 const parsed = new URL(url);
254 const allowed = new URL(allowedOrigin);
255 return parsed.origin === allowed.origin;
256 } catch {
257 return false;
258 }
259}
260
261// Rename archive to add extension because after downloading
262// archive does not contain extension type and it leads to some issues

Callers 5

getNextReleasesUrlMethod · 0.90
getAvailableVersionsMethod · 0.90
getAvailableVersionsMethod · 0.90
getAvailableVersionsMethod · 0.90
util.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected