3007 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+7 more
duotive says

hey. i have a problem with my theme and a customer. when in a panel page, you click an submit button that sends post info to the same page, but it redirects to [url]&reauth=1 and asks me to login again with an infinite loop that i can’t get away from. any ideas? thanks.

2468 posts
  • Has been part of the Envato Community for over 5 years
  • Has sold $100+ on Envato Market
  • Has referred 100+ members
  • Has been a beta tester for an Envato feature
+2 more
digitalimpact says

Without seeing the actual code executed after hitting submit, it’s hard to tell.

You should also post it on Forrst. Need an invite? :)

20 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 500+ members
  • Has sold $250,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+7 more
olegnax says

I’ve got same problem with WPML users.

Problem was at nested trail slash after domain.tld

So when form was submitted, url was changed to domain.tld//wp-admin … and i’ve got redirected with &reauth=1 variable.

I’ve fixed this problem by set correct action=”[url]” attribute for form that posted variables.

I hope it can help you.

3007 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+7 more
duotive says

I’ve got same problem with WPML users.

Problem was at nested trail slash after domain.tld

So when form was submitted, url was changed to domain.tld//wp-admin … and i’ve got redirected with &reauth=1 variable.

I’ve fixed this problem by set correct action=”[url]” attribute for form that posted variables.

I hope it can help you.
the intresting bit is that it works for a while and than it stops. i tried adding the url but i dose not work. Here is the code:
<?php //INSERT FUNCTIONS

    function insert_slide_in_db($id = 'NULL', $title='no-title',$text='no-text',$link='no-link',$img='no-img') {
        global $wpdb;
        $insert_query = "INSERT INTO `duotive_slider` (`ID`, `TITLE`, `TEXT`, `LINK`, `IMG`) VALUES ('".$id."', '".$title."', '".$text."', '".$link."', '".$img."');";
         $insert = $wpdb?>get_results($insert_query);
    }
if (isset($_POST['title']) && isset($_POST['text']) && isset($_POST['link']) && isset($_POST['img']) )
            {
                if ($_POST['title'] != '' && $_POST['text'] != '' && $_POST['link'] != '' && $_POST['img'] != '' )    
                    insert_slide_in_db(NULL,$_POST['title'],$_POST['text'],$_POST['link'],trim($_POST['img']));
            }
    // IF ALL THE FIELDS ARE FIELD ADD A SLIDE TO THE DB
    ?>
  <h4>Add a new slide in the current front-page slideshow</h4>
  <form method="POST" action="<?php bloginfo('url'); ?>/wp-admin/admin.php?page=my-submenu-handle">
        <table class="widefat post fixed postbox" id="duotive-options-page" cellpadding="0">
            <thead>
                <tr>
                    <th>Add a new slider</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>
                        <ul>
                            <li>
                                <span class="li_title">Slide image:</span>
                                <input name="img" size="20" class="fullwidth" value="add image" type="text" onfocus="if(this.value=='add image') this.value='';" onblur="if(this.value=='') this.value='add image';" />
                            </li>                       
                            <li>
                                <span class="li_title">Slide title: </span>
                                <input name="title" size="20" class="fullwidth" value="add title" type="text" onfocus="if(this.value=='add title') this.value='';" onblur="if(this.value=='') this.value='add title';" />
                            </li>
                            <li>
                                <span class="li_title">Slide description: </span>
                                <textarea name="text" class="fullwidth" onfocus="if(this.value=='add description') this.value='';" rows="8" onblur="if(this.value=='') this.value='add description';">add description</textarea>                            
                            </li>
                            <li>
                                <span class="li_title">Slide link:</span>
                                 <input name="link" size="20" class="fullwidth" value="#" type="text" onfocus="if(this.value=='#') this.value='';" onblur="if(this.value=='') this.value='#';" />                            
                            </li>  
                        </ul>
                    </td>
                </tr>
                <tr class="alternate">
                    <td>
                        <input name="search" class="button" value="Add Slide" type="submit" />                                                    
                    </td>
                </tr>  
                </tbody><tfoot>
                    <tr>
                        <th>Add a new slider</th>
                    </tr>
                </tfoot>                                                               

        </table>   
    </form>
unfortunatly i can’t paste all the code because its 600 lines.
963 posts
  • Has been part of the Envato Community for over 6 years
  • Has sold $10,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
EireStudio says

unfortunatly i can’t paste all the code because its 600 lines.

http://pastie.org/

3007 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+7 more
duotive says


unfortunatly i can’t paste all the code because its 600 lines.

http://pastie.org/

i pasted the code that is involved in the process.

596 posts Themes and Graphics
  • Has been part of the Envato Community for over 5 years
  • Has referred 50+ members
  • Has sold $250,000+ on Envato Market
  • Has been a beta tester for an Envato feature
+9 more
Bebel says


I’ve got same problem with WPML users.

Problem was at nested trail slash after domain.tld

So when form was submitted, url was changed to domain.tld//wp-admin … and i’ve got redirected with &reauth=1 variable.

I’ve fixed this problem by set correct action=”[url]” attribute for form that posted variables.

I hope it can help you.
the intresting bit is that it works for a while and than it stops. i tried adding the url but i dose not work. Here is the code:
<?php //INSERT FUNCTIONS

    function insert_slide_in_db($id = 'NULL', $title='no-title',$text='no-text',$link='no-link',$img='no-img') {
        global $wpdb;
        $insert_query = "INSERT INTO `duotive_slider` (`ID`, `TITLE`, `TEXT`, `LINK`, `IMG`) VALUES ('".$id."', '".$title."', '".$text."', '".$link."', '".$img."');";
         $insert = $wpdb?>get_results($insert_query);
    }
if (isset($_POST['title']) && isset($_POST['text']) && isset($_POST['link']) && isset($_POST['img']) )
            {
                if ($_POST['title'] != '' && $_POST['text'] != '' && $_POST['link'] != '' && $_POST['img'] != '' )    
                    insert_slide_in_db(NULL,$_POST['title'],$_POST['text'],$_POST['link'],trim($_POST['img']));
            }
    // IF ALL THE FIELDS ARE FIELD ADD A SLIDE TO THE DB
    ?>
  

Add a new slide in the current front-page slideshow

Add a new slider
  • Slide image:
  • Slide title:
  • Slide description: add description
  • Slide link:
Add a new slider
unfortunatly i can’t paste all the code because its 600 lines.

Sorry if this sounds harsh, but have you ever checked your code for security issues? I really hope this is early development code. Even if it is only in the wordpress backend. NEVER EVER trust the user’s input! NEVER use $_GET, $_POST. $_FILES, $_SESSION .. unfiltered. Thats the worst thing you can do.

3007 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+7 more
duotive says

it’s the backend. if they wanna hack their own theme that is their problem

596 posts Themes and Graphics
  • Has been part of the Envato Community for over 5 years
  • Has referred 50+ members
  • Has sold $250,000+ on Envato Market
  • Has been a beta tester for an Envato feature
+9 more
Bebel says

Even if it is in the backend.. At least provide basic security. You’ll only have to write a filter once and can then use it for all your projects.

And saying thats their problem – no, its yours, cause you provide insecure code :)
Just trying to help.

3007 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+7 more
duotive says

Even if it is in the backend.. At least provide basic security. You’ll only have to write a filter once and can then use it for all your projects. And saying thats their problem – no, its yours, cause you provide insecure code :)
Just trying to help.
okey:) thanks, but i don’t think that is why wordpress is requesting reauth

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by