We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15083
    • 697 Posts
    I have a page that POSTS data to another page.
    In firebug I can see all my POST data being sent fine to the target page.

    On the target page all the $_POST data is fine.
    Now the problem I have occurs when I put a carriage return in any of my TEXTAREA inputs.
    When I do this again in firebug the POST data is being sent, however in the target page if I do a print_r($_POST) the TEXTARA value is blank!?

    This is odd no?
      • 15083
      • 697 Posts
      Turned out it was an include class that was sanitizing the $_POST...and was a little over sensitive.
      Can anyone comment on this approach, IE sanitise the POST vars, stick them back in POST to be used in a snippet.
      I guess MODx uses this approach for cleaning dangerous input from the $_POST.
        • 18913
        • 654 Posts
        How about having a snippet on the target page which takes the POST data, does whatever needs to be done, then calls the snippet you really want to use via $modx->runSnippet with the new version of the POST data as parameters?
        Or maybe I’m misunderstanding smiley
        Matt
          • 15083
          • 697 Posts
          Quote from: mconsidine at Apr 07, 2011, 07:55 AM

          How about having a snippet on the target page which takes the POST data, does whatever needs to be done, then calls the snippet you really want to use via $modx->runSnippet with the new version of the POST data as parameters?
          Or maybe I’m misunderstanding smiley
          Matt

          I dont really have a problem....my problem has become a question:
          Does it make sense to have a seperate class to sanitise $_POST and then put it back into $_POST.
          It confused the hell out of me smiley
            • 18913
            • 654 Posts
            It confused the hell out of me
            Me too, apparently wink
            Best regards,
            Matt
              • 11055 ☆ A M B ☆
              • 3,112 Posts
              we’re under a serious discussion about modx’s security on my other post.
              Jason gave me a clue about what Revo does on the $_POST submission (see his comment on the bottom).
              Perhaps that’s what you’re after.
                Rico
                Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
                MODx is great, but knowing how to use it well makes it perfect!

                www.virtudraft.com

                Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

                Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

                Maintainter/contributor of Babel

                Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
                • 15083
                • 697 Posts
                Quote from: goldsky at Apr 07, 2011, 10:20 AM

                we’re under a serious discussion about modx’s security on my other post.
                Jason gave me a clue about what Revo does on the $_POST submission (see his comment on the bottom).
                Perhaps that’s what you’re after.

                ty...this helps...