Page Index Toggle Pages: 1
Topic Tools
Normal Topic [SVN] Posting as Guest cant continue after Preview (Read 4,610 times)
Jet Li
Legacy Dev Team
Development Team
****
Offline



Posts: 6,588
Location: Hong Kong
Re: [SVN] Posting as Guest cant continue after Preview
Reply #8 - Jan 23rd, 2010 at 9:50am
Post Tools
New
Sources\Post.pl
in CVS.
  

PM me for YaBB Installation Service
Back to top
WWWGTalkFacebook  
IP Logged
 
Jet Li
Legacy Dev Team
Development Team
****
Offline



Posts: 6,588
Location: Hong Kong
Re: [SVN] Posting as Guest cant continue after Preview
Reply #7 - Jul 17th, 2009 at 11:37am
Post Tools
cepheid wrote on Jul 17th, 2009 at 11:26am:
This patch applies cleanly to the YaBB3 SVN - I tested it.

We know, but Matt have may modified files on his harddisk which he is working on. Wink
  

PM me for YaBB Installation Service
Back to top
WWWGTalkFacebook  
IP Logged
 
cepheid
Senior Member
****
Offline



Posts: 516
Re: [SVN] Posting as Guest cant continue after Preview
Reply #6 - Jul 17th, 2009 at 11:26am
Post Tools
deti wrote on Jul 17th, 2009 at 11:21am:
Matt, can you please add this to your SVN as I don't want to produce conflicts with your modified files?

This patch applies cleanly to the YaBB3 SVN - I tested it.
  
Back to top
WWW  
IP Logged
 
deti
Legacy Dev Team
Development Team
****
Offline



Posts: 2,650
Location: Prien am Chiemsee, Germany
Re: [SVN] Posting as Guest cant continue after Preview
Reply #5 - Jul 17th, 2009 at 11:21am
Post Tools
Grate! Works! Thanks!

Matt, can you please add this to your SVN as I don't want to produce conflicts with your modified files?
  

Was immer Du tun kannst
oder erträumst tun zu können,
beginne es.
Kühnheit besitzt Genie,
Macht und magische Kraft.
Beginne es jetzt.
Whatever you can do
or dream you can,
begin it.
Boldness has genius,
power and magic in it.
Begin it now.
J. W. Goethe
Back to top
WWW  
IP Logged
 
cepheid
Senior Member
****
Offline



Posts: 516
Re: [SVN] Posting as Guest cant continue after Preview
Reply #4 - Jul 17th, 2009 at 6:17am
Post Tools
This is fixed using option #1 (carrying forward the verification code) via the following patch:

http://dev.3phase.com/yabb/patches/post_guestverify.patch

I can do #2 or #3 if you prefer.
  
Back to top
WWW  
IP Logged
 
cepheid
Senior Member
****
Offline



Posts: 516
Re: [SVN] Posting as Guest cant continue after Preview
Reply #3 - Jul 16th, 2009 at 9:10pm
Post Tools
Edited:
Old post removed.  See below.

Well, it's clear what the problem is... the user-entered verification code is being passed forward in a hard-coded manner, but the Preview page is using the now-obsolete captcha method and fails to carry forward the sessionid in which the code is embedded, causing the validation check in Post2 to fail.

The fix for this is one of three things:

1) Carry forward the sessionid hidden field, so that the validation check in Post2 will actually work.

2) Don't hardcode the verification code that the user enters; make the user re-enter the verification code every time he hits Preview or Submit (and the code will change each time).

3) Don't require the verification code for Preview; only require it for Submit.  You could either do this the easy way (put a note that the verification image is required only for Submit), or the hard way (don't even show the verification image until a user hits Submit, then show it in an interstitial page or using AJAX). 

#1 and #2 are very easy; #1 is much more user-friendly, of course.  #3 is harder to implement but also user-friendly.

I prefer #2 (not user-friendly), but I suspect you'll want me to do #1 instead. Smiley  Though, #3 wouldn't be too hard.
« Last Edit: Jul 16th, 2009 at 9:57pm by cepheid »  
Back to top
WWW  
IP Logged
 
deti
Legacy Dev Team
Development Team
****
Offline



Posts: 2,650
Location: Prien am Chiemsee, Germany
Re: [SVN] Posting as Guest cant continue after Preview
Reply #2 - Jul 16th, 2009 at 8:58pm
Post Tools
cepheid wrote on Jul 16th, 2009 at 7:21pm:
I'll try to look into this later today.

Would be nice!
  

Was immer Du tun kannst
oder erträumst tun zu können,
beginne es.
Kühnheit besitzt Genie,
Macht und magische Kraft.
Beginne es jetzt.
Whatever you can do
or dream you can,
begin it.
Boldness has genius,
power and magic in it.
Begin it now.
J. W. Goethe
Back to top
WWW  
IP Logged
 
cepheid
Senior Member
****
Offline



Posts: 516
Re: [SVN] Posting as Guest cant continue after Preview
Reply #1 - Jul 16th, 2009 at 7:21pm
Post Tools
I'll try to look into this later today.  I don't think it's an issue with the verification code itself, since that is now self-contained and works fine in every other location.
  
Back to top
WWW  
IP Logged
 
deti
Legacy Dev Team
Development Team
****
Offline



Posts: 2,650
Location: Prien am Chiemsee, Germany
[SVN] Posting as Guest cant continue after Preview
Jul 16th, 2009 at 8:50am
Post Tools
If you post as Guest and then click on "Preview" and then again on "Preview" you get this:

"The Verification code was not the same as the image presented on screen, please go back, refresh (hit F5 on most browsers) and try again."
  

Was immer Du tun kannst
oder erträumst tun zu können,
beginne es.
Kühnheit besitzt Genie,
Macht und magische Kraft.
Beginne es jetzt.
Whatever you can do
or dream you can,
begin it.
Boldness has genius,
power and magic in it.
Begin it now.
J. W. Goethe
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top