View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
04265Bug reportsOtherpublic2010-06-08 21:51
Reporterelameno Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.87+ 
Summary04265: IE7 users see "Error / We are sorry but you don't have permission to do this..." when accessing a survey that doesn't exist.
Description

When a user running IE7 attempts to click a link for a survey that has been removed from Lime, the user receives an error message telling them to contact the admin rather than the "Sorry. There is no matching survey." message that they should receive.

This will most likely result in a much larger volume of calls and support requests for us.

I'll attach a screenshot of the error message.

Steps To Reproduce
  1. Create / Insert participants / Activate a closed survey with tokens.
  2. Send out emails to the participants.
  3. Delete the survey.
  4. Use the link in the email to surf to the survey using IE7.
TagsNo tags attached.
Attached Files
SurveyOver_IE7.png (4,180 bytes)   
SurveyOver_IE7.png (4,180 bytes)   
index.php.patch (970 bytes)   
Index: index.php
===================================================================
--- index.php	(revision 8754)
+++ index.php	(working copy)
@@ -143,6 +143,24 @@
     exit;
 }
 
+//  Survey does not exist
+if (!is_array(getSurveyInfo($surveyid, $_SESSION['s_lang'])))
+{
+    require_once(dirname(__FILE__).'/classes/core/language.php');
+    $baselang = GetBaseLanguageFromSurveyID($surveyid);
+    $clang = new limesurvey_lang($baselang);
+    sendcacheheaders();
+    doHeader();
+    //SURVEY DOES NOT EXIST. POLITELY EXIT.
+    echo templatereplace(file_get_contents("$standardtemplaterootdir/default/startpage.pstpl"));
+    echo "\t<center><br />\n"
+    ."\t".$clang->gT("Sorry. There is no matching survey.")."<br /></center>&nbsp;\n";
+    echo templatereplace(file_get_contents("$standardtemplaterootdir/default/endpage.pstpl"));
+    doFooter();
+    exit;
+}
+
+
 if ($surveyid &&
 $issurveyactive===false &&
 isset ($surveyPreview_require_Auth) &&
index.php.patch (970 bytes)   
Bug heat12
Complete LimeSurvey version number (& build)8411
I will donate to the project if issue is resolved
BrowserIE7
Database type & versionMySQL 5
Server OS (if known)Fedora 10
Webserver software & version (if known)Apache 2.2
PHP Version5.2.9

Users monitoring this issue

texens, elameno

Activities

elameno

elameno

2010-04-06 17:07

reporter   ~11589

I figure I should mention that Firefox 3.6.3 shows "Sorry. There is no matching survey." which I presume to be the correct behavior if there is no survey with the given ID.

After looking at the code I'm a little but confused as to what is supposed to happen in this case.

Thanks!

elameno

elameno

2010-04-07 20:27

reporter   ~11598

I realize now that the difference between the two responses was not caused by a different in browsers, but because I had logged into the admin.php page using Firefox.

So technically I don't think this is a bug. It would be nice for the system to report that a survey does not exist rather than an error though. Any thoughts on this?

Mazi

Mazi

2010-05-12 00:29

updater   ~11776

So what do you suggest we should change? Is it just the error message?

elameno

elameno

2010-05-12 15:06

reporter   ~11796

It would help us out here if Lime would report that the requested survey does not exist, or something to that nature. If possible, it would be really nice to have the message displayed there be customizable.

To let you know the use case:
We have automated our end of course surveys here at LeTourneau University and the automation system harvests the data from Lime and then deletes the survey in Lime after each survey expires (one per class). We are having students that are visiting the survey URL from the invitations and reminder emails after the surveys have been deleted and the error message is throwing them for a loop and, as such, we are receiving a lot of tech support requests that would be very easily resolved if there were a user-friendly message displayed informing them that the survey doesn't exist.

Feel free to ask more questions if you need to.

Thanks!

Mazi

Mazi

2010-05-14 14:00

updater   ~11817

Texens, another issue for you to look at. If you have any questions please contact Thibault.

texens

texens

2010-05-16 01:09

reporter   ~11821

When a survey has been deleted by the admin, and a surveyee tries to use the survey link (emailed to him), he sees the following message: "Sorry. There is no matching survey." I'm guessing that this is the message that your students are seeing when they click on deleted survey links from their email. This message sounds right as it informs the surveyee that no such survey exists right now.

We could modify it though to say something like "The survey has been deleted and exists no more". We'll have to maintain a record of surveyID of all the past surveys and crosscheck with this list to find out if there was ever a survey by this id.
elameno, does this sound right to you? hope I didn't miss or misunderstand anything. let me know.

elameno

elameno

2010-05-19 15:11

reporter   ~11875

Well, unless you changed something, that message is only seen by someone who is logged into the system. If a typical user, who has no rights to log into Lime and administer surveys, attempts to view a survey that has been deleted they get the error message.

If you log out of lime and then visit the URL you should see the message I'm referring to. That's unless you've made some code modifications.

I think that "Sorry. There is no matching survey." is a much better message, but it would still be nice if there would be some way to customize it.

Let me know if you have any other questions and thanks for all your help on this!

texens

texens

2010-05-21 20:29

reporter   ~11942

Unable to reproduce the aforementioned behavior in 1.90beta2.

On taking the aforementioned steps, I am directed to a page that displays: "Sorry, There are no matching surveys".
Since elameno got this behavior with 1.87+ (build 8411), I'm guessing that this has already been fixed.

elameno, could you please upgrade to 1.88 and confirm the same?

Thanks

elameno

elameno

2010-05-24 17:33

reporter   ~11949

Hi Texens,
I've just downloaded the latest code from the stable branch and I still have the issue; however, you will need to open up a completely new browser window and NOT log in to the admin interface in order to see the behavior.

I saw the "Sorry, there are no matching surveys" message both after I had logged into the admin interface and even when I had logged out (curious). When I closed the browser, restarted it, and then navigated to the survey URL immediately I received the error message.

Thanks again for your help. :)

Mazi

Mazi

2010-05-26 13:59

updater   ~11967

Texens, can you check if we can add a better error message at the according lines of the code?

texens

texens

2010-05-27 06:33

reporter   ~12000

Confirmed, I've been able to reproduce this bug on a Windows machine. Due to some (mysterious) reasons, the same bug is not reproducable on ubuntu 10.04 :|

elameno, Thanks for reporting the bug. This error msg is indeed a confusing message and should be changed.

texens

texens

2010-05-27 07:01

reporter   ~12001

Added a patch to fix the issue. Since this patch directly affects all the surveys and is in the main index file, it may affect the security of the survey or lead to unexpected behaviour.

elameno, could you please apply this patch and confirm that the bug has been fixed. Also, please let me know if this patch leads to any unexpected behaviour.

c_schmitz, could you please take a look at the patch? Just want to make sure that it doesn't compromise LimeSurvey's security or differ from its usual behaviour for any corner cases that I might not be aware of.

c_schmitz

c_schmitz

2010-06-02 14:11

administrator   ~12097

I used a different approach which uses less resources and just finds out earlier if the survey exists or not.

Issue History

Date Modified Username Field Change
2010-04-06 16:46 elameno New Issue
2010-04-06 16:46 elameno File Added: SurveyOver_IE7.png
2010-04-06 17:07 elameno Note Added: 11589
2010-04-07 20:27 elameno Note Added: 11598
2010-04-07 20:28 elameno Issue Monitored: elameno
2010-04-11 00:31 c_schmitz Status new => assigned
2010-04-11 00:31 c_schmitz Assigned To => c_schmitz
2010-05-12 00:29 Mazi Note Added: 11776
2010-05-12 00:29 Mazi Status assigned => feedback
2010-05-12 15:06 elameno Note Added: 11796
2010-05-12 15:06 elameno Status feedback => assigned
2010-05-14 14:00 Mazi Note Added: 11817
2010-05-14 14:00 Mazi Assigned To c_schmitz => texens
2010-05-16 01:09 texens Note Added: 11821
2010-05-16 01:09 texens Status assigned => feedback
2010-05-19 15:11 elameno Note Added: 11875
2010-05-19 15:11 elameno Status feedback => assigned
2010-05-21 20:29 texens Note Added: 11942
2010-05-21 20:29 texens Status assigned => feedback
2010-05-24 17:33 elameno Note Added: 11949
2010-05-24 17:33 elameno Status feedback => assigned
2010-05-26 13:59 Mazi Note Added: 11967
2010-05-27 01:58 texens File Added: Screenshot-4317-login.png
2010-05-27 01:58 texens File Deleted: Screenshot-4317-login.png
2010-05-27 06:27 texens File Added: index.php.patch
2010-05-27 06:33 texens Note Added: 12000
2010-05-27 06:33 texens Status assigned => confirmed
2010-05-27 07:01 texens Assigned To texens => c_schmitz
2010-05-27 07:01 texens Status confirmed => assigned
2010-05-27 07:01 texens Note Added: 12001
2010-05-27 12:28 Mazi Status assigned => feedback
2010-05-28 02:32 texens Issue Monitored: texens
2010-06-02 14:11 c_schmitz Note Added: 12097
2010-06-02 14:11 c_schmitz Status feedback => resolved
2010-06-02 14:11 c_schmitz Resolution open => fixed
2010-06-08 21:51 c_schmitz Status resolved => closed
2010-10-25 00:18 c_schmitz Category Survey Taking => (No Category)
2021-08-04 11:58 guest Bug heat 8 => 12