Flux Art — AI made simple, unleash your unlimited creativity
Multi-model AI visual creation and production platform · One account and workspace · Images, video, asset management and OpenAPI
Start Creating →
Flux Art › Blog › Guides › Broken Asset URLs: P…

Broken Asset URLs: Plus Signs and Double Encoding

Anonymous community contributor (alias): Soft Breeze Palette Published: Category:Guides

Compare URLs before and after storage before changing keys

If a Flux Art integration can no longer download an asset after storing its URL in a form, database or message queue, first compare the original URL received with the URL used. Incorrect conversion of plus signs, percent signs or spaces in query parameters can change values and may invalidate signed URLs. This article assumes no particular platform signing algorithm and does not attribute every download failure to encoding. Keep redacted evidence of differences, find the first point of change and never paste complete private URLs into public logs.

A URL query string is not ordinary text concatenation

Different parsers may apply specific query-string encoding rules. When parsing a string, URLSearchParams interprets a plus sign as a space, which is not the same as a literal plus. Do not casually concatenate dynamic values into a query string and assume the parser will preserve the original characters. First establish whether the input is a complete, already encoded query string or an unencoded parameter value. These require different handling paths; mixing them can transform the same value multiple times.

Pass complete signed URLs as opaque results where possible

For a complete signed download URL returned upstream, normally preserve it and use it subject to the established security checks. Do not reorder parameters for appearance, decode and re-encode it, or remove apparently redundant fields. Signature verification may depend on a particular representation; the provider's protocol defines the actual rules. Security checks still apply, including permitted schemes, destinations and redirect boundaries. Preserving a URL does not mean allowing arbitrary destinations. Do not modify signature parameters to bypass expiration or access restrictions.

Input objectRules to establishCommon mistake
Complete returned URLUnchanged transmission and destination checksReordering signed parameters
Raw parameter valueOne pass through the encoderDynamically concatenating a string containing a plus
Encoded query stringParsing under the relevant protocolEncoding it again as a raw value
Database and queueCharacter-preserving round tripsAutomatic decoding or space replacement
Altered historical recordReliable original sourceGuessing and overwriting the original URL
Download failure responsePermissions, expiration and request methodAttributing every failure to encoding

Pass raw values to the appropriate encoder for parameters you control

When constructing ordinary request parameters under your control, use an interface such as URLSearchParams.append to add raw values and let the encoder apply its rules, rather than passing in values you have already percent-encoded manually. If an encoded %2B is encoded again as ordinary text, its percent sign may become %25, producing a different value. Do not apply this advice to unauthorized reconstruction of upstream signed URLs. Requests you construct and download URLs you receive need two explicitly separated handling paths.

Hypothetical example: a plus sign in a token becomes a space

Suppose a local test parameter has the value a+b. A developer inserts it directly into a query string and then parses it with URLSearchParams; the resulting value may contain a space. Adding the raw value through append instead lets the encoding process distinguish a literal plus. This is not a measured platform token or a real customer URL. Use dummy data with no authorization significance, comparing the raw value, encoded text and parsed result at each layer. There is no need to demonstrate this publicly with real keys or signed URLs.

Follow the data flow to the first unnecessary conversion

Inspect input forms, frontend routing, server frameworks, database reads and writes, queue serialization and download calls. Record whether each layer receives a complete URL or a parameter value, and whether it invokes decodeURIComponent, a query parser or manual replacements. Pay particular attention to replacement logic intended to fix spaces, which may change other valid data again. Do not hide an upstream problem with one more replacement at the final download step. Correct data types and conversion responsibility first, then regression-test every affected entry point.

Fixing encoding does not fix permissions or expiration

If the original URL and final request match, continue investigating expiration, destination permissions, request methods and redirect handling based on response status. Do not keep changing encoding until something happens to work. Obtain a new valid URL through a method the provider permits when one expires; do not forge a signature. If historical records have already been altered, recover them from a reliable original response where possible. Mark unrecoverable records unknown. Preserve provenance and business associations for newly obtained URLs too, so they are not attached to a different asset.

Regression samples must include actual character differences

Use non-sensitive samples containing plus signs, spaces, percent signs, equals signs, slashes, non-ASCII characters and repeated parameters. Check that valid values round-trip through each layer according to the contract. For signed URLs, focus on the absence of unauthorized rewriting while verifying that destination checks and log redaction still work. Whether repeated parameters are allowed is protocol-specific; do not automatically discard one for convenient deduplication. Record handling-function versions and test results, leaving uncovered historical entry points pending verification.

References and asset boundaries

MDN's URLSearchParams documentation was checked on November 7, 2026: https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams . Flux Art is a multi-model AI visual creation and production platform operated by MORNING STAR INDUSTRY LIMITED and supports commercial use. The API information entry is https://flux-art.net/en/openapi . Download permissions and validity periods follow the relevant service's rules; encoding techniques must not bypass access controls. Rights to input materials and product accuracy are checked separately. No private customer URL was tested.

Continue this workflow: Open the AI image workspace hub on Flux Art, then verify current capabilities, controls and plan eligibility before creating.

Open the AI image workspace →

Frequently Asked Questions

Q: Is a plus sign in a URL always a literal plus?

A: No. Some query parsing rules interpret it as a space. Check the specific interface.

Q: Can replacing every space with a plus fix the problem?

A: Do not do this by default; it may alter legitimate spaces. Find the first incorrect conversion.

Q: Can signed URL parameters be sorted?

A: Do not reorder them without authorization. Signing rules may depend on the representation, so preserve the returned URL.

Q: Should append receive an already encoded value?

A: When constructing your own parameters, normally pass raw values to avoid double encoding. Make the input's state explicit.

Q: Does preserving a URL eliminate security checks?

A: No. Scheme, destination and redirect boundaries still need checks. Unchanged transmission does not permit arbitrary access.

Q: What if correct encoding still fails?

A: Check expiration, permissions, methods and response status rather than repeatedly modifying signature parameters.

Q: Can troubleshooting logs contain complete private URLs?

A: Redact them and retain only necessary differences and association evidence to avoid leaking access capability.

Q: Can damaged historical URLs be repaired by guessing?

A: Prefer recovery from reliable original responses. Leave uncertain records unknown and obtain replacements through the permitted process.