Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-24-2008, 01:59 PM
SteveCoppin SteveCoppin is offline
 
Join Date: Feb 2008
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Challenging post data preservation problem

Our system sits behind a seperate authentication layer. When the authenticated user details are passed to our vbulletin instance we auto log the user in via code we have placed in global.php.

(if you need any more info on this to answer the question below, please ask)

The problem we are facing is that when the session times out, for example while creating a new post, the post data is lost on it's way to the next page. I think this could be due to the do_login_redirect() function, which doesn't appear to preserve post data.

In short, my question is: how do you preserve post data when passing between pages?
Reply With Quote
  #2  
Old 06-25-2008, 07:39 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You'll have to pass the data around, as if it is not passed around, it will be lost. Although the user could just go back and it (should) still be there.
Reply With Quote
  #3  
Old 06-25-2008, 09:29 AM
SteveCoppin SteveCoppin is offline
 
Join Date: Feb 2008
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you.

Any advice on the best way to pass it around?

I can't see in the code base an example of how to store $_POST in the postdata GPC string variable, but i think this might be the answer. Is this what that field is intended for?
Reply With Quote
  #4  
Old 06-25-2008, 11:47 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

$vbulletin->GPC is an array of all values that have been run through the input cleaner.
Reply With Quote
  #5  
Old 06-25-2008, 11:58 AM
SteveCoppin SteveCoppin is offline
 
Join Date: Feb 2008
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The $postvars variable in do_login_redirect() (of functions_login.php) is being populated by the values I have put in to $vbulletin->GPC['postvars'], however the vars are still not being retrieved by the next page.

It appears that the method does not work as I though it might..

Any idea how I can get the values in to newreply.php from the do_login_redirect page?

Hope this makes sense..
Reply With Quote
  #6  
Old 06-30-2008, 08:32 AM
SteveCoppin SteveCoppin is offline
 
Join Date: Feb 2008
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Posting about this a couple of days ago but didn't get a complete answer..

I have written a Single Sign On (SSO) script that sits in my global.php The script takes credentials from the header and uses them to log the user in. The problem arises when the users session is interrupted and the have to be re-logged in. When this happens, they are logged in and do_login_redirect() is called. Somewhere down the line the post data ($_POST) isn't being carried through to the next page.

So, for example:

The user logs in and goes to post a reply. Takes longer than the timeout to write the reply and when they post the login process is kicked off. Behind the scenes the user is logged in and passed back to newreply.php, but the POST data is missing, leaving the user with no new post and just a friendly blank screen.

Does anyone have any idea how I can get around this.. A couple of ideas:

- Store the POST data somewhere where I can retrieve it again
- Not to redirect (but currently I am greeted with another blank screen when I comment out)

I have tried both of these but have had no luck. I'm very nearly out of ideas and patience and would really appreciate some help!!

If you don't understand the problem but would still like to help, please ask questions!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:05 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04187 seconds
  • Memory Usage 2,206KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete