iOS GCM: CIQ settings do not accept the text "alert"( and "%20" is URL-decoded

Related: https://forums.garmin.com/forum/deve...and-characters

Environment
iOS 10.3.3 (iPhone)
Garmin Connect Mobile: 3.22.4.1

Description
Entering certain text in CIQ app settings (string properties) causes unexpected behaviour. As far as I know, it doesn't matter which CIQ app you use, as long as it has a string setting.

NOTE: Because this forum seems to have a similar problem to iOS GCM, please ignore the quotes in"alert"( for this bug report to make sense.

Case A: "alert"(
If you enter "alert"( in a string field and attempt to save settings, you will be presented with an "Access Denied" error page. This is perhaps related to the fact that "alert"() is a function in javascript, although other javascript functions or reserved keywords don't seem to trigger this behaviour. Placing any number of spaces between the "t" and "(" does not mitigate this problem.

Case B: Text such as "%20" is inappropriately URL decoded
e.g.
1) Enter "hello%20world" in a string field (without quotes, not that it should make a difference)
2) Save settings
3) Open settings again
Actual behaviour: string field contains "hello world"
Expected behaviour: string field contains "hello%20world"

This is clearly related to the bug linked above where a stray "%" will cause settings to be displayed with default values on the next load.

Clearly there is an issue with URL encoding and decoding of app settings transferred via HTTP. e.g. Perhaps settings are never encoded on send, but always decoded on receive, or something like that.

App to use for re-creation:
Training Notes:
https://apps.garmin.com/en-GB/apps/e...9-fe49891d7e76

Any one of the "Line" fields, which are strings, will exhibit the behaviour described above.
  • Former Member
    Former Member
    Hey Horsetooth,

    I just tried this set of steps and I'm still saving settings successfully. I tried recording a video, but the forums were not kind in trying to upload it. My setup mirrors almost exactly your other user's setup with a fenix 5, iOS, and GCM versions...Have you made any changes to settings from version to version? I'm wondering if there might be an edge case that we aren't seeing like previous settings on the device with changed names or a different type of setting used in its place. Something along those lines? Any thoughts you have on this would be great. I promise I'm trying to work it out!

    Thanks,
    - Coleman
  • yes, the last change in settings was to add the Offline URL field itself - it wasn't in the previous versions. Let me know if there's anything I should try, I should still be able to repro it.
  • Former Member
    Former Member
    Have you tried doing and actual uninstall and reinstall of your app on the device? The only thing I can think is that I've only had the latest version on there so maybe there is an older version of the settings file on the device that isn't being re-written with the new settings file correctly? Are you able to enter that url in the Nightscout site URL or does it fail you there too? I know it won't work, but is it possible that it's a problem with that setting and not the URL or the settings API?
  • yes, I had tried uninstalling the app (CGM Loop) first thing, but I tried it again just now and it still fails. Also fails when entering http://127.0.0.1:1972 into the Nightscout URL field.. attaching screenshot of the failure in case it helps.community.garmin.com/.../1354680.png
  • What version of GCM/iOS are you running (check settings in the app). Is there a companion app on the phone?

    I thought Apple was moving to https only (at least for some things) and the screen shot shows http....
  • the version #'s are in earlier posts (#10 and #11), the http://127.0.0.1:* is a local web server (exported by a "companion" app, that doesn't know anything about Garmin - its not my app), so shouldn't be restricted by apple, and in fact works fine since i hardcoded shortcuts to refer to it and the app works fine with that. however, i'd like to resolve why settings are failing - these are just string settings so nothing should be referring to the url at the point of this failure.
  • Former Member
    Former Member
    Horsetooth,

    I'm talking to the app store right now about the error you've attached. Since there is more info about the error in your screen shot, I am hopeful that they can give us some more guidance.

    Thanks,
    - Coleman