Forum Discussion

MorningStar's avatar
MorningStar
Icon for Bronze I rankBronze I
2 months ago
Solved

Need Help - Java: Insecure Temporary Files

This exercise appears to be fairly simple at first glance, however I am unable to meet the criteria for my code to be accepted. When I click on "Test My Code", it says "Working" but not "Secure". 

The Deployment Log says, 
"VERIFY: Testing application functionality...
VERIFY: PASS: Healthcheck page retrieved successfully 
VERIFY: PASS: Login page retrieved successfully
VERIFY: PASS: Logged in with valid credentials
VERIFY: PASS: User data loaded
VERIFY: Tests complete. Application is WORKING

Ideally, either the Application Log or the Deployment Log should provide some clue of the error or the task that is not completed. 
I have used the recommended method to create a Temporary File and delete it in a finally block after use. I can provide my code changes here, if needed.

  • I restarted the course. Perhaps the previous failure was because I hadn't explicitly visited the /webapp/tmp.json file path before providing the fix. At any rate, I punched in the file name in the url (and saw the exact same contents as /webapp/data) and resubmitted the same code as before and this time it completed the task.
    It would have been a great help if the log provided me information as to which of the tasks had not been met to satisfaction. At any rate, I do not need help with this exercise any longer.

  • KieranRowley's avatar
    KieranRowley
    Icon for Community Manager rankCommunity Manager

    Hey MorningStar congrats on solving the lab and thank you for coming back and letting everyone know that you don't need assistance :)

  • I restarted the course. Perhaps the previous failure was because I hadn't explicitly visited the /webapp/tmp.json file path before providing the fix. At any rate, I punched in the file name in the url (and saw the exact same contents as /webapp/data) and resubmitted the same code as before and this time it completed the task.
    It would have been a great help if the log provided me information as to which of the tasks had not been met to satisfaction. At any rate, I do not need help with this exercise any longer.