View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
04265 | Bug reports | Other | public | 2010-04-06 16:46 | 2010-06-08 21:51 |
Reporter | elameno | Assigned To | c_schmitz | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 1.87+ | ||||
Summary | 04265: 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 |
| ||||
Tags | No tags attached. | ||||
Attached Files | 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> \n"; + echo templatereplace(file_get_contents("$standardtemplaterootdir/default/endpage.pstpl")); + doFooter(); + exit; +} + + if ($surveyid && $issurveyactive===false && isset ($surveyPreview_require_Auth) && | ||||
Bug heat | 12 | ||||
Complete LimeSurvey version number (& build) | 8411 | ||||
I will donate to the project if issue is resolved | |||||
Browser | IE7 | ||||
Database type & version | MySQL 5 | ||||
Server OS (if known) | Fedora 10 | ||||
Webserver software & version (if known) | Apache 2.2 | ||||
PHP Version | 5.2.9 | ||||
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! |
|
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? |
|
So what do you suggest we should change? Is it just the error message? |
|
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: Feel free to ask more questions if you need to. Thanks! |
|
Texens, another issue for you to look at. If you have any questions please contact Thibault. |
|
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. |
|
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! |
|
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". elameno, could you please upgrade to 1.88 and confirm the same? Thanks |
|
Hi Texens, 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. :) |
|
Texens, can you check if we can add a better error message at the according lines of the code? |
|
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. |
|
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. |
|
I used a different approach which uses less resources and just finds out earlier if the survey exists or not. |
|
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 |