Welcome, Guest
Username: Password: Remember me

TOPIC: Token values come back after deleting, interfere with testing

Token values come back after deleting, interfere with testing 2 years 11 months ago #67113

  • gskramer
  • gskramer's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 16
  • Karma: 0
Hello everyone,
When testing surveys, we often issue invitations to ourselves and generate tokens for that purpose. We may then complete and submit a survey using that token, delete the token, and then create a new token to test again. We find that the exact same token string often "comes back" somehow in the newly created token - with the result that we don't get a fresh copy of the survey, but see the answers from a previous test submission. For example:
(1) On Monday, I generate a token and invite myself to take a survey - say the token value is "a5f33418ef1be9d8cc46417aaf8498db".
(2) On Tuesday, I want to test again with a fresh copy of the survey. I delete the token from Monday, and generate a new token - but the new token has the exact same string as the previous one: "a5f33418ef1be9d8cc46417aaf8498db", so therefore:
(3) When I go to take the survey, Limesurvey sees the answers from Monday in the lime_survey table and displays them instead of giving me a fresh copy.

I've found it does work to list the responses to the survey, find the one associated with the original token, and delete the response. That way I get a fresh copy even if Limesurvey does re-create the same token value. But why does it do that, and is there a way to prevent it? Many thanks for any advice!
The administrator has disabled public write access.

Re: Token values come back after deleting, interfere with testing 2 years 11 months ago #67115

  • holch
  • holch's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2715
  • Thank you received: 331
  • Karma: 121
Why don't you keep the test tokens until you are finished with testing and then delete them?
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.

Re: Token values come back after deleting, interfere with testing 2 years 11 months ago #67116

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
That sounds weird. Did yiou change the token length? Because a token like "a5f33418ef1be9d8cc46417aaf8498db" looks pretty long to me. Looks more like a session ID.

Which Limesurvey version do you use?

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Token values come back after deleting, interfere with testing 2 years 11 months ago #67119

  • holch
  • holch's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2715
  • Thank you received: 331
  • Karma: 121
Good catch Mazi.

Isn't there a limit of 15 characters or so for the length of the token anyway?
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.

Re: Token values come back after deleting, interfere with testing 2 years 11 months ago #67120

  • gskramer
  • gskramer's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 16
  • Karma: 0
Thank you, you have led me to the answer! We have an external survey management app that actually creates the token values, based on a MD5 hash - Mazi's comment made me realize that we're getting the same token values because the hash algorithm is getting fed the same parameters over and over - it wasn't Limesurvey after all! Thanks, and sorry to have bothered you with a bogus question.
The administrator has disabled public write access.

Re: Token values come back after deleting, interfere with testing 2 years 11 months ago #67150

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
gskramer wrote:
Thank you, you have led me to the answer! it wasn't Limesurvey after all! Thanks, and sorry to have bothered you with a bogus question.
You're welcome!

If our hints have been helpful and you enjoy limesurvey please consider a donation to the team .
We do all this in our free time and you don't have to pay a penny for this software.

Without your help we can't keep this project alive.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Token values come back after deleting, interfere with testing 2 years 11 months ago #67151

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
holch wrote:
Good catch Mazi.

Isn't there a limit of 15 characters or so for the length of the token anyway?
There is no fixed limit. At survey settings -> tokens -> "Set token length to..." you can change the setting which defaults to 15.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Token values come back after deleting, interfere with testing 2 years 11 months ago #67331

  • gskramer
  • gskramer's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 16
  • Karma: 0
Point taken about the donation! Our organization (a non-profit) has gotten great benefit from Limesurvey and from this forum. I've asked our financial person to authorize a donation - if that's not approved, I can make a small one out of pocket.
The administrator has disabled public write access.

Re: Token values come back after deleting, interfere with testing 2 years 11 months ago #67334

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
Great, thanks!

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.132 seconds
Donation Image