<p></p>
<p dir="auto">Well that URL is not an API so it's not up to the user to provide arbitrary input so we don't try very hard to validate it.</p>
<p dir="auto">What actually happens is that we call <code class="notranslate">trace_data_url(params[:gpx], :format => :xml)</code> to generate a URL to pass to the underlying iD instance and that throws an exception because rails expects the first parameter to be a trace object ID and it isn't.</p>
<p dir="auto">Now sure I could write a bunch of code to validate it first and return 400 instead of 500 and the average user gains what from that? Pretty much nothing really.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/3540#issuecomment-1115226848">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLN4BSXM2IZUXI27PCLVIANVXANCNFSM5U36MTYQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLKUPMXRXERYLOP4GH3VIANVXA5CNFSM5U36MTY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIJ4QFYA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/issues/3540/1115226848</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/3540#issuecomment-1115226848",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/3540#issuecomment-1115226848",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>