Freecodecamp: Code from other's profiles should not be stored in browser

Created on 22 Dec 2016  路  5Comments  路  Source: freeCodeCamp/freeCodeCamp

Challenge Accessing Nested Arrays has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

// Setup
var myPlants = [
  { 
    type: "flowers",
    list: [
      "rose",
      "tulip",
      "dandelion"
    ]
  },
  {
    type: "trees",
    list: [
      "fir",
      "pine",
      "birch"
    ]
  }  
];

// Only change code below this line

var secondTree = " "; // Change this line


We all know that sharing free code camp's challenge link will allow others to check on the problem. But there is a problem. If someone opens the link the problematic code will be saved to their account. If a new user who hasn't completed the challenge opened that link in his past, he may face issues due to missing codes. It happened to me. Instead of var secondTree = " "; // Change this line | I got myPlant[1].list[1]; which made me confused and was giving me a reference error. The problem was solved with code reset. But those users who don't know about code reset might face some problem.

on the roadmap

Most helpful comment

The code sharing overhaul would effect all challenges with solutions. The idea is to store code in redis and use ids to find that code instead of encoding them in the uri.

All 5 comments

@sahilsunny thanks for the issue. Yes, this has been brought up before. I too have been aware of this and whenever I open someone else's code, I open it up into an incognito mode so that it doesn't affect my own progress. I think there's an issue somewhere that addresses this, but I can't find it. Anyways, I'm not sure or can't remember exact how the rest of the community feels about this. I'll leave this open for discussion.

cc/ @FreeCodeCamp/moderators

I think this will be resolved with the code sharing overhaul. Not sure though. Would be great if someone could confirm.

@systimotic that project aims to target for backend challenges only.
@BerkeleyTrue do we have any plans to remove the storing code from visiting someone's solution in the cache?

The code sharing overhaul would effect all challenges with solutions. The idea is to store code in redis and use ids to find that code instead of encoding them in the uri.

I'm closing this issue as stale since it hasn't been active lately. If you think this is still relevant to the newly updated platform, please explain why, then reopen it.

Was this page helpful?
0 / 5 - 0 ratings