Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Post with No URLSessionFormat

Contributor ,
Apr 21, 2006 Apr 21, 2006
Is there a way you could post form and strip out all the URLSessionFormat eg
check the HTTP_REFERER without the URLSessionFormat like CFID=16539&CFTOKEN=88882009&jsessionid=64301634311145628979265
TOPICS
Getting started
514
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Contributor , Apr 24, 2006 Apr 24, 2006
Thanks BKBK for your reply, but that did not do. What I did to strip out the URLTOKEN is this
#SpanExcluding(http_referer,"?")#
Translate
Community Expert ,
Apr 23, 2006 Apr 23, 2006
referrer without query-string:
<cfoutput>#ReplaceNoCase(cgi.http_referer,"?#cgi.query_string#","")#</cfoutput>




Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 24, 2006 Apr 24, 2006
Thanks BKBK for your reply, but that did not do. What I did to strip out the URLTOKEN is this
#SpanExcluding(http_referer,"?")#
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 24, 2006 Apr 24, 2006
> that did not do
Try it.

<cfoutput>#ReplaceNoCase(cgi.http_referer,"?#cgi.query_string#","")#</cfoutput>

will output the referrer without query-string attached, assuming there is a referrer, of course.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 25, 2006 Apr 25, 2006
BKBK,
The safest way I think this wiil be done is to use the "SpanExcluding". In my own case if you use "cgi.query_string" it will fail since the srings passed are "UrlToken" thus it would have been:
<cfoutput>#ReplaceNoCase(cgi.http_referer,"?#urltoken#","")#</cfoutput> and this would have worked. But what if it were a "query_string" then it will fail. So SpanExcluding is a better option.

Thanks for all your help.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 25, 2006 Apr 25, 2006
But SpanExcluding strips out the entire query string too?

This regex should remove the three attributes and their values, but leave the rest of the query string intact:
REReplaceNoCase(http_referer,"&?(cfid|cftoken|jsessionid)=[^&]+","","all")
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 25, 2006 Apr 25, 2006
LATEST
In my own case if you use "cgi.query_string" it will fail since the srings passed are "UrlToken" thus it would have been:
<cfoutput>#ReplaceNoCase(cgi.http_referer,"?#urltoken#","")#</cfoutput> and this would have worked. But what if it were a "query_string" then it will fail. So SpanExcluding is a better option.

Now, you've lost me. I don't understand the distinction you make here. Any code that deletes the string "?#cgi.query_string#" from a URL will also delete "?#session.urltoken#" from it. In general, the string session.URLToken is contained in the string cgi.query_string, not the other way round, as you seem to suggest.

That said, there are of course at least a dozen possible ways to do it. The choice is yours.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources