Not able to send mail from ColdFusion 10 - coldfusion

In my application I am using ColdFusion 10. I am not able to send any mail using the cfmail tag.
When I log into the administrator and click on the Undelivered Mail button, it is throwing the following error:
Error retrieving markup for element mailBody : Client verification failure. [Enable debugging by adding 'cfdebug' to your URL parameters to see more information]
Error invoking CFC /CFIDE/administrator/mail/undeliveredmail.cfc : Client verification failure. [Enable debugging by adding 'cfdebug' to your URL parameters to see more information]
Can anyone tell me what is wrong?

It sounds like you have a bad CF installation. The admin should not be throwing errors, this looks like a permissions issue at first glance.
Have you tried setting all the params within the cfmail tag (eg, mailserver, username, pwd) instead of using the values set in CFadmin?
Do you get an error when you create a single CFM page with just a CFMAIL tag in it?
You need to ensure your CF install is up to date with all the hotfixes and that they are installed correctly.
see http://forums.adobe.com/thread/884947
or post the error message you are getting when you use your CFMAIL tag

Related

django-rest-framework-social-oauth2: error 400 - redirect_uri_mismatch

I've been trying to add google login to my django app following this tutorial:
https://github.com/RealmTeam/django-rest-framework-social-oauth2
By following exactly the instructions, everything works fine in local.
However, when I try to replicate the same on the server, I get the following error on the redirect page of the login:
Error 400: redirect_uri_mismatch
redirect_uri: http://localhost:8000/auth/complete/google-oauth2/
What is strange to me is, in my google developer console, I have set up the correct redirect url in my app, as follows:
https://mydjangoapp.com/auth/complete/google-oauth2/
And I have also put 'mydjangoapp.com' under 'Authorised JavaScript origins'.
So my question is, why google keeps telling me that the redirect url is
http://localhost:8000/auth/complete/google-oauth2/
which is not the one I have set up in the console? Perhaps there is something obvious that I'm missing here. Thank you!
Why google keeps telling me that the redirect url is
Because your application is sending its in your code the app is running on http://localhost:8000 and if you are using a client library its probably adding the rest automatically.
http://localhost:8000/auth/complete/google-oauth2/
The redirect uri must exactly match what you are sending from your application.
You need to add
http://localhost:8000/auth/complete/google-oauth2/
Javascript origin is only needed if your code is using javascript.
This video will show you how to fix the error. Google OAuth2: How the fix redirect_uri_mismatch error. Part 2 server sided web applications.
If you want your code to send https://mydjangoapp.com then your going to have to be running it from https://mydjangoapp.com probably and you may need to figure out how to configure it so that it is running from the correct host.

RequestDumperValve breaks POST request

I have an historic ColdFusion 9 server running on top of JBoss 5.1 on Scientific Linux 6.2.
Every once in a while I see the error
2019-08-20 12:15:30,621 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/REDACTED].[CfmServlet]] (ajp-0.0.0.0-8009-8) Servlet.service() for servlet CfmServlet threw exception
javax.servlet.ServletException: ROOT CAUSE:
java.lang.IllegalArgumentException
at coldfusion.filter.FormScope.parseQueryString(FormScope.java:375)
at coldfusion.filter.FormScope.parsePostData(FormScope.java:346)
at coldfusion.filter.FormScope.fillForm(FormScope.java:296)
at coldfusion.filter.FusionContext.SymTab_initForRequest(FusionContext.java:377)
in the file /var/log/jboss/server.log
To find out what seems to be the problem I thought it's somehow possible to log the POST params JBoss received and is trying to prepare for ColdFusion to use. On the internet I read I should go to file /opt/jboss/server/default/deploy/jbossweb.sar/server.xml and uncomment the line <Valve className="org.apache.catalina.valves.RequestDumperValve" />.
Now, the params (cookie, header, POST etc.) are indeed logged into the server.log file. The ColdFusion server, however, does not do its task anymore. I open CFADMIN in the browser and enter the password. I'm not let in. I, again, see the log-on page. Same is true for my application. I see in the server.log file the parameters (username and password) are correct. They are logged in clear text.
There's a story on the internet that describes how the RequestDumperValve destroys a request by applying wrong encoding. Does something like this happen to me? Are there other possibilities to log the POST params in JBoss?

django error reporting request url - how to use this locally?

I have a django project which used the normal email admins on an unhandled exception when debug is set to False. ie in production.
I normally just review the error message and the stack trace. However I clicked on the request url link, which managed to recreate the error on the prouduction site (which then fired off another email).
What is this request url? Does it recreate the full http request (including the session etc..) which resulted in the original error?
Can I get the link to point to a local version of the site? (As after fixing a previous error clicking on the earlier request url has manged to create a recent error that we have been unable to reproduce, so it would be good to recreate this locally so it can be debugged.

Coldfusion 10 File Not Found Error

When I try to access a page that is not found, Coldfusion 10 provides this error page instead of redirecting to our 404 Page Not Found page. How can I get Coldfusion to redirect to our Page Not Found page instead of providing this error message?
At he point at which the error is thrown the web server is not actually in control of the request. It is waiting for CF to "hand back" the request as string buffer - content to serve.
That means there is an additional step in CF to handle missing templates. You can set (as Adam has said) the missing template handler in the CF admin - or if you are using an Application.cfc you can use the function onMissingTemplate() to do whatever you think is appropriate for a missing cfm page.
Since the request was made for a .cfm page Coldfusion is expected to handle the request, since the file is not found then Coldfusion triggers the standard 404 error. You can do 1 of 2 things:
Set up a 404 template on the Coldfusion administrator, as Mark A Kruger suggested.
Set up the Application.cfc to handle the request by using the onMissingTemplate() function. Here is more documentation on that: http://bit.ly/17k4Ry8
NOTE: You can set up your onMissingTemplate() function to redirect to the actual 404 template, since it sounds like you already have one. This would be considered a Soft 404 to the crawlers.
Good Luck!
Thanks -Al

Unable to View Undelievered Mail in CF Administrator

When I go to the Mail option in CF10 and click the "View Undelivered Mail" button I am getting following errors:
Error retrieving markup for element mailBody : Client verification
failure. [Enable debugging by adding 'cfdebug' to your URL parameters
to see more information]
Error invoking CFC /CFIDE/administrator/mail/undeliveredmail.cfc :
Client verification failure. [Enable debugging by adding 'cfdebug' to
your URL parameters to see more information]
Does anyone have any idea why am I not able to see Undelivered mail?
Try deleting any ColdFusion related cookies in your browser, such as CFID, CFTOKEN, CFAUTHORIZATION_cfadmin and CFADMIN_LASTPAGE_ADMIN, and then restart your browser.
Look for an 0-byte file named something like "Mail4117192657238440155.cfmail" in your /Applications/ColdFusion10/cfusion/Mail/Undelivr folder and delete it. That fixed the problem for me.