File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JForum and the fly likes Error after resetting password Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Error after resetting password" Watch "Error after resetting password" New topic
Author

Error after resetting password

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hello everybody,

I have an error after resetting my password, and is as follows:

1. In the login page, I ask to reset my password, fill in the information and I receive the email.
2. In the email, I click the URL and the browser opens in the correct page.
3. I submit the new password, I get the message that it updated successfully and I click on the link to go to the login page.
4. In the login page, I insert my login and the new password, submit the information, and I get the following error:

(URL http://localhost:8080/jforum/jforum.page)

HTTP Status 404 -

--------------------------------------------------------------------------------

type Status report

message

description The requested resource () is not available.
----------------------------------------------------------------------------

The information is, in fact, submitted, because if I go directly to the forum's homepage, I can see that I'm logged in.

I noticed that the HTML for the login page contains (after the recover password process)
<input type="hidden" name="returnPath" value="http://localhost:8080/jforum/jforum.page" />

whereas the "simple" login page contains
<input type="hidden" name="returnPath" value="http://localhost:8080/jforum/forums/list.page" />

So, why do I get the error? Is it some misspelled URL redirection after processing jforum.page?

I'm running JForum 2.1.8 in the following environment:

"Using CATALINA_BASE: /root/tomcat
Using CATALINA_HOME: /root/tomcat
Using CATALINA_TMPDIR: /root/tomcat/temp
Using JRE_HOME: /etc/java6
Server version: Apache Tomcat/6.0.16
Server built: Jan 28 2008 11:35:29
Server number: 6.0.16.0
OS Name: Linux
OS Version: 2.6.9-42.ELsmp
Architecture: i386
JVM Version: 1.6.0_05-b13
JVM Vendor: Sun Microsystems Inc."


Thank you for support,
Alexandre Ramos
[originally posted on jforum.net by aramos]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
As you found out, it looks like the returnPath on the login screen is not correct. You are getting logged on, but then being transferred to a non-existent page. This causes the 404 error.

I'm not sure how this is getting set up wrong. The recoverPasswordValidate method doesn't set a returnPath parameter. The only other option I see is that the referrer header is being passed with the strange URL for some reason.

Try setting the login.ignore.referrer to true in your jforum-custom.conf file. This will force the login page to only use returnPath parameters and ignore the referrer.

If this causes issues with people requesting pages, being directed to the login page, and then not getting back to the page they where trying to see... You might try adding a "hack" into the forum_login.htm Freemarker code that checks for that URL and corrects it.

Finally, you might look at creating a custom 404 page with a link back to the main site. Just to make it easier for users who find a bad link.
[originally posted on jforum.net by monroe]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error after resetting password
 
Similar Threads
Guide on interfacing with JForum
How to programmatically login to JForum using Crowd Authentication
Session Timeout 404 Bug
Reg Manual Creation of new Topics -
cannot login in tomcat adim