Confirmation after vote Confirmation after vote
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Confirmation after vote

Started by sjordan, August 08, 2006, 12:44:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sjordan

Hello,

I'm working with a client. He wanted a confirmation of some sort after votes were cast. I noticed that ratepic.php uses two redirects:

lines 119 & 120
Quoteheader($header_location . $location);
pageheader($lang_info, "<META http-equiv=\"refresh\" content=\"1;url=$location\">");

As line 119 uses the php header functionality, it seems that line 120 would never get executed. But looking at line 121 ...
Quotemsg_box($lang_info, $lang_rate_pic_php['rate_ok'], $lang_continue, $location);
it looks like at some point the mechanism to provide a confirmation and then redirect was supported.

Thus I commented out line 119, effectively re-instating the confirmation feature; things seemed to work as the client wanted, except for one thing -- in his browser IE 6, no redirect happened.

Security settings are at default. Nothing particularly special about them.

Any thoughts on all this?

Thanks in advance.

CPG v 1.4.8

sjordan

Any thoughts on the vote confirmation?

Stramm

seems the header call has been forgotten to replace somewhen. However it's not the right place to add some sort of confirmation. That you'd need to have before the query that stores the vote into the db.

Seems to be pretty easy to do to me. In the code not only GET pic and rate but also eg. confirm. If confirm <> yes you call the new code, else execute the existing one.

In the new code block you have just a link or button that calls the page itself again ( ratepic.php?pic=xxx&rate=xxx&confirm=yes )

done