Solved

Cold Fusion code question

Posted on 2014-11-06
4
83 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Hi, I will be creating today a basic tutorial on how we can create a Mail Custom Function and use it where ever we want. The main advantage about creating a custom function is that we can accommodate a range of arguments to pass to the Function and …
CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

757 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

23 Experts available now in Live!

Get 1:1 Help Now