• Resolved ace0930

    (@ace0930)


    I wanna add an admin notice by admin_notices after the redirect by wp_safe_redirect. But I cannot put any code after the wp_safe_redirect because it should always come with exit.

    I found this method which passes a query string to the URL.

    My question is what would happen to the database? Because the query string will pass to the database, right?

    Let’s say I pass ?success=yes like wp_safe_redirect ( 'https://www.testing.com?success=yes' ), the success actually doesn’t exist in the database? I just wonder if this causes any security problem?

Viewing 1 replies (of 1 total)
  • Sending ‘?success=yes’ alone does not cause any security problem.

    What COULD cause a security problem is what your custom code does when it detects various URL parameters.

    If, for example, you had code that looked for a query parameter of:

    ?foo=bar

    and then your code went and did its own custom database query using ‘bar’, you’d have to be more careful. If all you’re doing is outputting a custom message, you should be fine ??

Viewing 1 replies (of 1 total)
  • The topic ‘How to add admin notice after redirect’ is closed to new replies.