Admin Notifications Error Admin Notifications Error
 

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

Admin Notifications Error

Started by a$h, April 22, 2006, 01:30:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

a$h

Hi there.

I think there is an error in report_file.php

Everything seemse to work ok, but when you receive e-mail instead to receive name of sender you receive <input type="text" class="textinput" value="Rekomandim" name="sender_name" style="width: 100%;" /> <ariani_sh@yahoo.co.uk>

Also instead to recive Subject, you recive A report from <input type="text" class="textinput" value="Guest" name="sender_name" style="width: 100%;" /> on a gallery file

Can somebody please help me with this?

Many thanks.

Joachim Müller

link and non-admin test user account please

a$h

#2
GauGau,

thanks for your quick response.

user: test
pass: test

I dont will this help, but the problem that I mentioned before (in my first post) I only get it when an anonymous reports to admin. I dont have problem when a regisetred user report to admin.

Thanks.

Joachim Müller

what language are you testing with?

a$h

Im testing it with English language, but as I said in previous post I only get error when an anynomus/guest user submit the notification to admin.

Thanks GauGau

Tranz

I was able to confirm this on my gallery (after someone tried to spam for ambien :P) using English. I submitted a report as an anonymous user to replicate the spammer's "report".

I think it has to do with this:
if ($USER_DATA['user_email']){
        $sender_email = $USER_DATA['user_email'];
        $sender_box = $sender_email;
} else {
        $sender_email = get_post_var('sender_email',$USER['email'] ? $USER['email'] : '');
        $sender_box = "<input type=\"text\" class=\"textinput\" value=\"$sender_email\" name=\"sender_email\" style=\"width: 100%;\" />";
        $sender_name = "<input type=\"text\" class=\"textinput\" value=\"$sender_name\" name=\"sender_name\" style=\"width: 100%;\" />";
}


The input fields are for displaying in the report form when it's an anonymous user. But the problem is the $sender_name variable goes unchanged into the email message.


a$h

Thanks TranzNDance.

Hopefully someone will have a solution for this?

Till then...

Regards,
a$h

Tranz

Got it. Please confirm fix.

Edit report_file.php
FIND:
        $sender_name = "<input type=\"text\" class=\"textinput\" value=\"$sender_name\" name=\"sender_name\" style=\"width: 100%;\" />";


REPLACE with:
        $sender_name = get_post_var('sender_name',$USER['name'] ? $USER['name'] : '');
        $sender_name_box = "<input type=\"text\" class=\"textinput\" value=\"$sender_name\" name=\"sender_name\" style=\"width: 100%;\" />";



FIND:
{$sender_name}

REPLACE with:
{$sender_name_box}

a$h

Thanks TranzNDance,

I can confirm that the fix that you provided is working. But you only need to modify the frist part and you DON'T need to replace {$sender_name} with {$sender_name_box}.

Once again thanks very much.

Kind regards,
Arian Sh.

Tranz

Thanks for confirming. However, I tried what you suggested and used $sender_name only and it resulted in no input box showing.

a$h

TranzNDance,

My mistake. You are right. If you dont make both modification provided by you in previous post, then there is no input filed for the name. I only realised this after I've deleted my cookies.

Once again thanks very much  ;)

Joachim Müller

@Thu: could you commit to stable and devel branch of svn please?

Tranz


Fabricio Ferrero

I think there is something that need to be clarificated (at least to me). I though I had discovered a bug on report_file.php but after searching the forum I realised this is a know issue.

I was going to report a nedeed modification in the file:

In "report_file.php"

Search: (line 200)

<td valign="top" class="tableb" width="60%">
                        {$sender_name_box}
                </td>


I think must be:

<td valign="top" class="tableb" width="60%">
                        {$sender_name}
                </td>

Later, searching the forum I see this: http://forum.coppermine-gallery.net/index.php/topic,30694.msg143762.html#msg143762

But doing that, resulted in no input box showing. TranzNDance already noticed that, but never was fixed.

So, what to do in order to get both features working properly?
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

Fabricio Ferrero

So? I think this is a thing that must be fixed. Am I missing something?  :-\
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

Joachim Müller

Merged fabri's new thread with the existing one. Thu, could you please look into this once again?

Tranz

Sorry for the delay. I think I fixed it for real this time. I added:

$sender_name = $USER_DATA['user_name'];
        $sender_name_box = $sender_name;


after:
if ($USER_DATA['user_email']){
        $sender_email = $USER_DATA['user_email'];
        $sender_box = $sender_email;


I have committed the change for versions 1.4 and 1.5.

Thanks for reporting the bug, Fabricio.

Fabricio Ferrero

Working both features at least to me  :)

Thanks Thu!
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)