Open V4Vern opened 4 weeks ago
No details provided by team.
[The team marked this bug as a duplicate of the following bug]
Unable to handle corrupt saved_topics.txt file
When saved_topics.txt is manually edited or corrupted via other reasons. The program should probably either clear the starred list or only load legal topic names. But currently the program loads the topic no matter what.
Example:
Hello from __________________________________________________________________________________________ _ _ __ ______ __ /| / / ) / / / ) ---/-| -/-----__----------__-------/----/----__-------/------/__----__-------/---------__- / | / /___)| /| / (_ ` / / / ) / / ) /___) / --, / ) _/___|/____(___ _|/_|/__(__)_____(____/___/___/_____/______/___/_(___ _____(____/___(___/_ What is your name? Maodian huang ____________________________________________________________ Hello Maodian huang ____________________________________________________________ What do you want from me? ____________________________________________________________ starred ____________________________________________________________ Here is the list of your favourite topics: - Entertainment - Technol - Sportssadasd ____________________________________________________________ What do you want from me? ____________________________________________________________ suggest ____________________________________________________________ 1. Suggesting an article from your favorite topic: Entertainment Title: The Matrix has a fifth film in the works and no this is not a simulation CNN URL: https://edition.cnn.com/2024/04/03/entertainment/matrix-fifth-movie/index.html No articles found for the topic: Technol No articles found for the topic: Sportssadasd ____________________________________________________________ What do you want from me? ____________________________________________________________
[original: nus-cs2113-AY2324S2/pe-interim#2371] [original labels: severity.Low type.FunctionalityBug]
[This is the team's response to the above 'original' bug]
i think it shows that the corrupted file is still handled quite gracefully whereby topics are still read and the system still runs without crashing.
Items for the Tester to Verify
:question: Issue duplicate status
Team chose to mark this issue as a duplicate of another issue (as explained in the Team's response above)
Reason for disagreement: [replace this with your explanation]
Description: There is no storage validation check on "saved_topics". There is input validation check on the program to prevent user from entering non-existent topics to your favourite list but this can be bypass by changing the text file.
Steps to Reproduce:
Edit the text file "saved_topics" and add
sadaad asdsad
Actual Result: When I list the starred topics, I can see the non-existent topics
Screenshot: