View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
15256Bug reportsRemoteControlpublic2019-09-11 17:42
Reportergbasterra Assigned Tocdorin  
PrioritynoneSeveritypartial_block 
Status closedResolutionno change required 
Product Version3.17.x 
Summary15256: get_session_key not working properly
Description

When executing a get_session_key with postman as per the attachments I´ve got the following errors :
1- First time executed (lime_sessions table clean) => {"id":1,"result":null,"error":"unknown method or incorrect parameters"} (screen1)
2- Second time : {"id":1,"result":null,"error":"CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'PRIMARY'. The SQL statement executed was: INSERT INTO lime_sessions (id, expire, data) VALUES (:yp0, :yp1, :yp2). Bound with :yp0='', :yp1=1568076066, :yp2='admin'"} (screen2)
3- In the table lime_sessions I see there´s an entry without any id (null or blank). (see attachment screen3)

As per my understanding the server is not being able to create the random id and because of that the first time it creates an entry in the table with id null so the second time when it tries to create a second row it´s rejected because id is null too.
Is it possible yii is not running or not being installed properly?

public function get_session_key($username, $password, $plugin = 'Authdb')
{
    $username = (string) $username;
    $password = (string) $password;
    $loginResult = $this->_doLogin($username, $password, $plugin);
    if ($loginResult === true) {
        $this->_jumpStartSession($username);
        $sSessionKey = Yii::app()->securityManager->generateRandomString(32);
        $session = new Session;
        $session->id = $sSessionKey;

.......

Steps To Reproduce

Execute in postman as indicated replacing localhost with mineria.hopto.org

screen1 and screen2

TagsNo tags attached.
Attached Files
screen1.png (154,441 bytes)
screen3.png (190,472 bytes)
screen2.png (135,113 bytes)
Bug heat4
Complete LimeSurvey version number (& build)Limesurvey Version 3.17.13+190824
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL 8.0.17
Server OS (if known)Windows 7 - X64
Webserver software & version (if known)
PHP Version7.3.8

Users monitoring this issue

There are no users monitoring this issue.

Activities

gbasterra

gbasterra

2019-09-10 19:33

reporter   ~53543

Found the issue. Yii was not installed. I think this should be included in the preinstall steps in documentation. Misleading to know where was the issue.

cdorin

cdorin

2019-09-11 17:42

reporter   ~53559

Hello, and thank you for mentioning what the issue was. Could you please add a note somewhere in the manual about the issue you found? Perhaps here: https://manual.limesurvey.org/Installation_-_LimeSurvey_CE ? Many thanks!

Issue History

Date Modified Username Field Change
2019-09-10 01:16 gbasterra New Issue
2019-09-10 01:16 gbasterra File Added: screen1.png
2019-09-10 01:16 gbasterra File Added: screen3.png
2019-09-10 01:16 gbasterra File Added: screen2.png
2019-09-10 19:33 gbasterra Note Added: 53543
2019-09-11 17:42 cdorin Assigned To => cdorin
2019-09-11 17:42 cdorin Status new => closed
2019-09-11 17:42 cdorin Resolution open => no change required
2019-09-11 17:42 cdorin Note Added: 53559