cfinput toggle readonly or disabled
Hi I want to be able to toggle disabled in my form fields. I have this code cfif do IS view cfset form_editable = disabled cfelse cfset form_editable = /cfif Then cfinput id=addr name=addr type=text value=#addr# #form_editable# / but it errors on the #form_editable# Is there anyway I can have either disabled or nothing in a cfinput field (the code does work if I don't use cfinput just input, but I want the error checking with cfinput Many thanks Seamus ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349739 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfinput toggle readonly or disabled
It seems you should be able to do: cfinput id=addr name=addr type=text value= disabled=#form_editable#/ On 2/2/12 12:54 AM, Seamus Campbell wrote: Hi I want to be able to toggle disabled in my form fields. I have this code cfif do IS view cfset form_editable = disabled cfelse cfset form_editable = /cfif Then cfinput id=addr name=addr type=text value=#addr# #form_editable# / but it errors on the #form_editable# Is there anyway I can have either disabled or nothing in a cfinput field (the code does work if I don't use cfinput just input, but I want the error checking with cfinput Many thanks Seamus ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349740 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfinput toggle readonly or disabled
Thanks - but no, the form only needs to see the word disabled ie disabled = false still disables the form (same with readonly) It seems you should be able to do: cfinput id=addr name=addr type=text value= disabled=#form_editable#/ On 2/2/12 12:54 AM, Seamus Campbell wrote: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349741 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Video Processing?
I've used ffmpeg for transcoding and appending videos to one another so if you're requirements are to transcode and append then ffmpeg will work nicely in my experience. I think you can also insert one video into another by splitting the second video and appending the parts in the right order. -- Mack ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349742 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Opinion: Abuse of session variables
On Wed, Feb 1, 2012 at 7:37 PM, James Holmes james.hol...@gmail.com wrote: Race conditions in session variables can only occur when two requests from the same session execute concurrently. This is more likely with ajax requests or framesets. Since everyone uses ajax requests these days (even though no-one uses framesets any more), it is still an issue, as you say. This can be true, depending on the situation and how you are using the session scope. However, untrue is the old adage of always lock your session variables. -Cameron -- Cameron Childress -- p: 678.637.5072 im: cameroncf facebook http://www.facebook.com/cameroncf | twitterhttp://twitter.com/cameronc | google+ https://profiles.google.com/u/0/117829379451708140985 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349743 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: the ##2 will not print with Bar Code 39 f HR cfprint comand
Yes, it prints from the server fine if I open the pdf and print from acrobat reader. it just wont print the #2 with the cfprint command. Can you put somewhere a copy of the PDF with the problem ? -- Mack ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349744 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Opinion: Abuse of session variables
I'd also argue that sometimes race conditions may not matter. Consider a session variable that tracks the # of pages you have viewed in your session. If I pop open a new tab and start reloading them both like crazy, it's possible the values may end up borked. But do we care? No. If it's just a simple stat and it's not perfect, then I'd ignore the hassle of locking the write/reads. On Thu, Feb 2, 2012 at 7:11 AM, Cameron Childress camer...@gmail.com wrote: On Wed, Feb 1, 2012 at 7:37 PM, James Holmes james.hol...@gmail.com wrote: Race conditions in session variables can only occur when two requests from the same session execute concurrently. This is more likely with ajax requests or framesets. Since everyone uses ajax requests these days (even though no-one uses framesets any more), it is still an issue, as you say. This can be true, depending on the situation and how you are using the session scope. However, untrue is the old adage of always lock your session variables. -Cameron -- Cameron Childress -- p: 678.637.5072 im: cameroncf facebook http://www.facebook.com/cameroncf | twitterhttp://twitter.com/cameronc | google+ https://profiles.google.com/u/0/117829379451708140985 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349745 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Video Processing?
I just recently wrapped up the code for a ColdFusion library that wraps ffmpeg.exe to transcode videos to any formats needed and uses the Video for Everybody output for HTML that serves up video for, well, everybody. ;-) No docs yet, but if this looks like something that would be helpful I can work on some docs. https://github.com/sebtools/Video-Converter Nothing for stitching, though, sorry. Thanks, Steve Hi all, I am curious if anyone has hands-on experience with processing video that they might be willing to share? I have a potential project which will need video transcoding services as well as stitching parts of videos together to form new videos. From looking around I saw the ffmpeg library though it's not immediately clear if this will meet my needs. I also see that Railo has a plugin which enables a CFVIDEO tag which may do what we're looking for. Anyone have experience with either of these that they'd be willing to share? Thanks! -Justin ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349746 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Video Processing?
Also take a look at Zencoder. Allows you to do all your video stuff via the cloud. They have a darn nice API too. http://www.raymondcamden.com/index.cfm/2011/4/26/Video-encoding-with-Zencoder On Tue, Jan 31, 2012 at 12:03 PM, Justin Scott leviat...@darktech.org wrote: Hi all, I am curious if anyone has hands-on experience with processing video that they might be willing to share? I have a potential project which will need video transcoding services as well as stitching parts of videos together to form new videos. From looking around I saw the ffmpeg library though it's not immediately clear if this will meet my needs. I also see that Railo has a plugin which enables a CFVIDEO tag which may do what we're looking for. Anyone have experience with either of these that they'd be willing to share? Thanks! -Justin ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349747 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Video Processing?
Hello Steve and everyone, Bring on the docs please. Peter Donahue - Original Message - From: Steve Bryant st...@bryantwebconsulting.com To: cf-talk cf-talk@houseoffusion.com Sent: Thursday, February 02, 2012 10:09 AM Subject: Re: Video Processing? I just recently wrapped up the code for a ColdFusion library that wraps ffmpeg.exe to transcode videos to any formats needed and uses the Video for Everybody output for HTML that serves up video for, well, everybody. ;-) No docs yet, but if this looks like something that would be helpful I can work on some docs. https://github.com/sebtools/Video-Converter Nothing for stitching, though, sorry. Thanks, Steve Hi all, I am curious if anyone has hands-on experience with processing video that they might be willing to share? I have a potential project which will need video transcoding services as well as stitching parts of videos together to form new videos. From looking around I saw the ffmpeg library though it's not immediately clear if this will meet my needs. I also see that Railo has a plugin which enables a CFVIDEO tag which may do what we're looking for. Anyone have experience with either of these that they'd be willing to share? Thanks! -Justin ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349748 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Working with an API - help
This all great info guys. Thanks! I don't quite have the big picture clear in my head. I think they have a server in their office running the software and database that supports the API. Can I access the data via the API using CF on any remote server? Do I need to install the COM object on the remote server running the website?? Can't I just use: cfobject class = program ID name = instance name action = connect context = remote server = address of server running the database and API type = com I wish I could get my hands on the current PHP website that's set up for this. First off, your server of course has to be Windows and can't be 64bit which doesn't have COM support. Then you install and register the COM object on your server. Once that's done, you instantiate it the way you're getting at: API = createObject(com, registeredComObjectNameHere); then access the methods on it: userProfile = API.cUserInfo(); ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349749 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Session info lost on BlackBerry
This is a ColdFusion/mobile question. I have a simple web app with a login page. User types their login info, session info is assigned, and they're taken to a projects page. This works fine, but when I try to setup an auto-login (user clicks a bookmark on their home screen that passes a username and password), the same process should occur, but the session info is lost once they are taken to the projects page. This occurs on the BlackBerry 9370 (w/ touch screen. not sure of the model type), but works fine when testing it in a browser and the BlackBerry simulator. Here's some code for the auto login: cfquery name=qryAccount EXEC m_AccountLogin @Username = cfqueryparam value=#LCase(url.u)# cfsqltype=cf_sql_varchar, @Password = cfqueryparam value=#LCase(url.p)# cfsqltype=cf_sql_varchar; /cfquery cfif qryAccount.recordcount cflock name=lockAccount type=exclusive timeout=10 cfset session.account = { isLoggedIn = true, MemberID = qryAccount.iMemberID, Role = qryAccount.iRole } /cflock cflocation url=/mobile/home/projects.cfm addtoken=true cfelse cflocation url=/mobile/index.cfm addtoken=true /cfif I read that using cflocation right after assigning session vars may cause an issue, so I tried a JavaScript re-direct and still came up short. Any ideas? Thanks in advance. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349750 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Session info lost on BlackBerry
Have you tried: cfheader statuscode=307 statustext=Temporary Redirect cfheader name=Location value=/mobile/index.cfm Paul -Original Message- From: Joshua Rowe [mailto:jos...@nvisionweb.com] Sent: Thursday, February 02, 2012 10:57 AM To: cf-talk Subject: Session info lost on BlackBerry This is a ColdFusion/mobile question. I have a simple web app with a login page. User types their login info, session info is assigned, and they're taken to a projects page. This works fine, but when I try to setup an auto-login (user clicks a bookmark on their home screen that passes a username and password), the same process should occur, but the session info is lost once they are taken to the projects page. This occurs on the BlackBerry 9370 (w/ touch screen. not sure of the model type), but works fine when testing it in a browser and the BlackBerry simulator. Here's some code for the auto login: cfquery name=qryAccount EXEC m_AccountLogin @Username = cfqueryparam value=#LCase(url.u)# cfsqltype=cf_sql_varchar, @Password = cfqueryparam value=#LCase(url.p)# cfsqltype=cf_sql_varchar; /cfquery cfif qryAccount.recordcount cflock name=lockAccount type=exclusive timeout=10 cfset session.account = { isLoggedIn = true, MemberID = qryAccount.iMemberID, Role = qryAccount.iRole } /cflock cflocation url=/mobile/home/projects.cfm addtoken=true cfelse cflocation url=/mobile/index.cfm addtoken=true /cfif I read that using cflocation right after assigning session vars may cause an issue, so I tried a JavaScript re-direct and still came up short. Any ideas? Thanks in advance. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349751 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Opinion: Abuse of session variables
of course for a newbie that has no idea what a race condition is, in todays PC society they might take that as an insult :-) On Thu, Feb 2, 2012 at 3:22 PM, Raymond Camden raymondcam...@gmail.comwrote: I'd also argue that sometimes race conditions may not matter. Consider a session variable that tracks the # of pages you have viewed in your session. If I pop open a new tab and start reloading them both like crazy, it's possible the values may end up borked. But do we care? No. If it's just a simple stat and it's not perfect, then I'd ignore the hassle of locking the write/reads. On Thu, Feb 2, 2012 at 7:11 AM, Cameron Childress camer...@gmail.com wrote: On Wed, Feb 1, 2012 at 7:37 PM, James Holmes james.hol...@gmail.com wrote: Race conditions in session variables can only occur when two requests from the same session execute concurrently. This is more likely with ajax requests or framesets. Since everyone uses ajax requests these days (even though no-one uses framesets any more), it is still an issue, as you say. This can be true, depending on the situation and how you are using the session scope. However, untrue is the old adage of always lock your session variables. -Cameron -- Cameron Childress -- p: 678.637.5072 im: cameroncf facebook http://www.facebook.com/cameroncf | twitterhttp://twitter.com/cameronc | google+ https://profiles.google.com/u/0/117829379451708140985 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349752 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Session info lost on BlackBerry
Is it connected to http://kb2.adobe.com/cps/181/tn_18171.html ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349753 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Video Processing?
@Mack - Thanks for the confirmation, that lets me know it's possible which is a good start. @Steve - Interesting, I will take a look at that as soon as I can. If it's just a wrapper for ffmpeg I can probably extend it to handle stitching if needed. @Ray - Thanks for the suggestion. I had e-mailed their sales team around the same time I posted my original note here and they've since responded that their service doesn't do stitching, just conversion. -Justin ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349754 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Invisible Scheduled Task
Hey, all - thanks for the ideas. I ended up manually going through the neo-cron.xml file for all our many, many instances and finally found it - it was in a very old instance that had been re-purposed a long time ago. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349755 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Video Processing?
Justin, I'll work on docs for my solution soon. In the meantime, you might also look at PandaStream if you are willing to use 3rd party pay-per-use libraries. http://www.pandastream.com/ Steve @Mack - Thanks for the confirmation, that lets me know it's possible which is a good start. @Steve - Interesting, I will take a look at that as soon as I can. If it's just a wrapper for ffmpeg I can probably extend it to handle stitching if needed. @Ray - Thanks for the suggestion. I had e-mailed their sales team around the same time I posted my original note here and they've since responded that their service doesn't do stitching, just conversion. -Justin ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349756 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfinput toggle readonly or disabled
It worked for me in Chrome, but didn't test in other browsers. Two other options are: 1) Put your cfinput in an if/else with/without that attributes. 2) Pass all the attributes in as an attributeCollection [1] cfset inputArgs = {id=addr, name=addr, type=text, value= ) / cfif NOT form_editable cfset structInsert(inputArgs, disabled, disabled, true/ /cfif cfinput argumentCollection=inputArgs/ [1] http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7f51.html On 2/2/12 2:28 AM, Seamus Campbell wrote: Thanks - but no, the form only needs to see the word disabled ie disabled = false still disables the form (same with readonly) It seems you should be able to do: cfinput id=addr name=addr type=text value= disabled=#form_editable#/ On 2/2/12 12:54 AM, Seamus Campbell wrote: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349757 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Video Processing?
Peter, They are really basic at this point, but I figure some documentation is better than no documentation. If anyone has any questions, I'll amend the file or add documentation accordingly. Thanks, Steve Hello Steve and everyone, Bring on the docs please. Peter Donahue I just recently wrapped up the code for a ColdFusion library that wraps ffmpeg.exe to transcode videos to any formats needed and uses the Video for Everybody output for HTML that serves up video for, well, everybody. ;-) No docs yet, but if this looks like something that would be helpful I can work on some docs. https://github.com/sebtools/Video-Converter Nothing for stitching, though, sorry. Thanks, Steve ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349758 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Crossed Accounts Issue
Is it no possible that you set your data to session once you knw the data is validated so that it uses the data passed in your argument and b'se you already have a clock inside it will prevent race condition. Return true if validated and set to session else return false. In that way you knw if it actually set to session or not. Sent from my iPhone On Feb 1, 2012, at 9:25 PM, Eric Roberts ow...@threeravensconsulting.com wrote: Best thing to do is to cflock the db action so that you can get a unique record. If the call to the cfc is what hands the entirety of the user authentication...put a lock around that call so that no other users are taking action until the first is done. -Original Message- From: Eric Williams [mailto:e99...@gmail.com] Sent: Wednesday, February 01, 2012 9:44 AM To: cf-talk Subject: Re: Crossed Accounts Issue I have an issue that I am hoping one of you can help me out with. The issue is caused when more than one user logs in with a few tenths of a second of each other. This happens maybe once every few weeks on a high volume application. The problem is with user information getting mixed up when authenticating. As you can see from the code below the authenticate component is called right before setting the session username. The authenticate component does all the basic checks and returns the user info. In these rare instances the session.RetAuth.username and all the info returned from the component are for another user that is logging in at the same time. CFSCRIPT if(NOT IsDefined(APPLICATION.oUser)){ APPLICATION.oUser=CreateObject(component, #APPLICATION.G.CFC_PATH#User); } APPLICATION.oUser.DSN=this.DSN; /CFSCRIPT CFSET session.RetAuth=APPLICATION.oUser.authenticate(form. Login,form.Password) CFSET SESSION.UserName=FORM.Login This is a race condition issue. You can solve it by implementing locking, either around this code or perhaps within your component. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our Dave, I already have a lock in the component, I create a unique uuid on each request for the lock. Did not solve the problem. Might try a lock around the entire login code. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349759 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Santizing User Input
The AntiSamy project is maybe the best way to sanitize any user input out there. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 On Thu, Feb 2, 2012 at 8:33 AM, douglas cohn douglas.c...@gmail.com wrote: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349760 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Santizing User Input
I second that. The AntiSamy project is maybe the best way to sanitize any user input out there. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 On Thu, Feb 2, 2012 at 8:33 AM, douglas cohn douglas.c...@gmail.com wrote: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349761 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Santizing User Input
Sorry for the OT post but I could not help but think of Little Bobby Tables. http://imgs.xkcd.com/comics/exploits_of_a_mom.png G! On Thu, Feb 2, 2012 at 9:42 PM, Andrew Grosset rushg...@yahoo.com wrote: I second that. The AntiSamy project is maybe the best way to sanitize any user input out there. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 On Thu, Feb 2, 2012 at 8:33 AM, douglas cohn douglas.c...@gmail.com wrote: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349762 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfinput toggle readonly or disabled
Thanks for that - I'll use your option 1 - I did think of that but it didn't seem particularly elegant, but it's simple and it works. And I can't get option 2 to work It worked for me in Chrome, but didn't test in other browsers. Two other options are: 1) Put your cfinput in an if/else with/without that attributes. 2) Pass all the attributes in as an attributeCollection [1] cfset inputArgs = {id=addr, name=addr, type=text, value= ) / cfif NOT form_editable cfset structInsert(inputArgs, disabled, disabled, true/ /cfif cfinput argumentCollection=inputArgs/ [1] http://help.adobe.com/en_US/ColdFusion/9. 0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7f51.html On 2/2/12 2:28 AM, Seamus Campbell wrote: Thanks - but no, the form only needs to see the word disabled ie disabled = false still disables the form (same with readonly) It seems you should be able to do: cfinput id=addr name=addr type=text value= disabled=#form_editable#/ On 2/2/12 12:54 AM, Seamus Campbell wrote: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349763 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Crossed Accounts Issue
On Wed, Feb 1, 2012 at 4:28 PM, Eric Williams wrote: CFSCRIPT if(NOT IsDefined(APPLICATION.oUser)){ APPLICATION.oUser=CreateObject(component,#APPLICATION.G.CFC_PATH#User); } APPLICATION.oUser.DSN=this.DSN; /CFSCRIPT CFSET session.RetAuth=APPLICATION.oUser.authenticate(form.Login,form.Password) CFSET SESSION.UserName=FORM.Login I see 3 problems with this code: 1. Why is that authentication component instantiated there instead of in the onApplicationStart()? 2. You are setting the DSN in a separate call from the authenticate() call. If your application uses the same DSN all the time, that should go in the onApplicationStart() as well. If not, the DSN should be an argument of the authenticate() call. 3. You are setting the session username to whatever was in the login form instead of what is returned from your authentication call. I would put money on not needing any locking at all to make this code thread-safe if you just refactor along those lines. Jochem -- Jochem van Dieten http://jochem.vandieten.net/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349764 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm