SunQuest
           ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old September 21st, 2004, 04:04 PM
jcool45 jcool45 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 39 jcool45 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 21 sec
Reputation Power: 4
running user input query

I'm trying to let the user input a query into a textarea then run the query using coldfusion and display results into a another textarea... Any ideas????

Reply With Quote
  #2  
Old September 21st, 2004, 04:08 PM
bocmaxima's Avatar
bocmaxima bocmaxima is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Aug 2004
Location: Tucson, Sonora
Posts: 1,322 bocmaxima User rank is Sergeant (500 - 2000 Reputation Level)bocmaxima User rank is Sergeant (500 - 2000 Reputation Level)bocmaxima User rank is Sergeant (500 - 2000 Reputation Level)bocmaxima User rank is Sergeant (500 - 2000 Reputation Level)bocmaxima User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 3 Days 17 h 46 m 5 sec
Reputation Power: 22
Send a message via AIM to bocmaxima
Form page:
Code:
<form method="post" action="whatever.cfm">
<p><input type="text" name="thequery"></p>
<p><input type="submit" value="Submit"></p>
</form>


Submission page:
Code:
<cfquery name="userquery" datasource="whateverDSN">
<cfoutput>
#Form.thequery#
</cfoutput>
</cfquery>
<cfoutput query="userquery">
#OutputFields#
</cfoutput>


It'll be a real bastard validating that though. One wrong line of syntax and it'll throw a CF error. Of course, you could use the cfthrow method (notice the nice lead intot that). Above is just a simplified version.

Reply With Quote
  #3  
Old September 21st, 2004, 05:13 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,627 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 10 h 8 m 55 sec
Reputation Power: 53
Not to mention that the user could then basically run queries of any type against any table that you've set the account to have access too. This is a gigantic security hole in my opinion and unless you really know what you are doing or you are not worried about security for this, I'd take another route.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
  #4  
Old September 22nd, 2004, 11:27 AM
jcool45 jcool45 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 39 jcool45 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 21 sec
Reputation Power: 4
Yeah it is a security issue...i didn't really think about that maybe I'll try somthing else


Thanks

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > running user input query


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway