Solved

Cold Fusion code question

Posted on 2014-11-06
4
85 Views
Last Modified: 2014-12-18
Hi,
I am looking at some cold fusion code that I didn't write and trying to figure out something.
Here is the code:

<cfcomponent displayname="Email" output="false">
      <cffunction name="getEnvProperAddress" access="public" output="false">
            <cfargument name="emailAddress" required="true" />
            <cfif application.environment neq "pro" and application.environment neq "beta">
                  <cfreturn application.email />
            <cfelse>
                  <cfreturn arguments.emailAddress />
            </cfif>
      </cffunction>
</cfcomponent>



I am particularly interested in this line:  <cfreturn application.email />

I need to figure out where the email address that is being returned is coming from.

This CF code runs on a web server that has SQL server as it's back end. There are many stored procs in SQL server but it doesn't look like a stored proc is being used here.

There is a file at the root level of the web server called Application.cfc but I don't see any reference in that file to email addresses.

Thanks for the help!
Nacht
0
Comment
Question by:nachtmsk
  • 2
  • 2
4 Comments
 

Author Comment

by:nachtmsk
ID: 40426079
FYI -- the above code is being called on the web page like this:

<cfset emailto="#(email.getEnvProperAddress(theEmail))#">


Also wondering what "theEmail" is referring to. Appears to be an object, but where is it coming from?
0
 

Author Comment

by:nachtmsk
ID: 40426110
Never mind, I figured out that 'theEmail' was a set variable.
0
 
LVL 25

Accepted Solution

by:
dgrafx earned 500 total points
ID: 40427706
search your entire code base for Application.environment and also search for Application.email
that should give a clue as to where they are being set
chances are the values are in a db table and when the Application starts the table is queried and the Application vars are set.

if you can't find Application.environment or Application.email then search for just environment and email
hopefully there aren't too many results
the syntax of setting them may be a bit different than cfset Application.environment for ex

post back with any questions ...
0
 
LVL 25

Expert Comment

by:dgrafx
ID: 40507479
well - thanks for the points!

good luck ...
0

Featured Post

Network it in WD Red

There's an industry-leading WD Red drive for every compatible NAS system to help fulfill your data storage needs. With drives up to 8TB, WD Red offers a wide array of solutions for customers looking to build the biggest, best-performing NAS storage solution.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now