Programming and reading.

  • 1 Post
  • 53 Comments
Joined 3 years ago
cake
Cake day: June 26th, 2023

help-circle


  • First, in your main, you want judt ErrorWindow ErrorWin;. As it is, you’re taking a pointer to a pointer with the & (also it’s not initialized).

    Second, does your MainWindow.hpp know the ErrorWindow? You may have to forward declare it (write class ErrorWindow; at the top, to tell the compiler it exists without saying anything else). If you include the other header files respectively, they include each other, so you get a cycle.















  • The value of this header cannot be set via JavaScript, so the server can assume that a) if this header is present, then the client is a web browser, and b) the value of the header can be trusted.

    This is already obviously wrong. It cannot be set from JavaScript, true, but any other client including scrapers may set it. So (a) is completely untrue, it being present implies nothing and (b) is also untrue by the nature of networking. You can only assume that it either came from a browser without manipulation, in which case the value can be trusted, or from an external source, in which case the attacker may set an arbitrary value.