Can I use Window History Back without compromising my safety?

325    Asked by DanPeters in Cyber Security , Asked on Oct 17, 2022

 I am doing a penetration test on a web application and it is using window.history.back() to go back to the previous page. Is this safe to use?

If I visit google.com and then go to the web application and then press back, it would present me with google.com again. 

Is this an actual issue? 


Answered by Ashish Mishra

You can read about windows.history Mozilla website. Briefly it explains that window history back is not different from clicking on the back button in your browser. I think that you are overthinking about windows.history.back, but not about window.history object itself!.

If I explain in detail it would be out of the topic, however, I can shortly claim that window.history.pushState() or window.history.replaceState() methods are more worth to worry about. The browser history manipulation is possible. You can also check out about it from : Manipulating the browser history



Your Answer

Interviews

Parent Categories