• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Ajax \'post\' requests into punbb

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
2 posts • Page 1 of 1

Postby sarim » Fri Jun 10, 2011 10:22 am

I am useing pfc with punbb 1.3.4 forum engine.
PFC is super cool, salut to the develops of pfc. CHEERES.

But after making the configurations i noticed that the chat script doesn't work,
it sends, sendRequest: /connect "Username"
But then, no request is received,i did a search into the javascript files and noticed in that in sendRequest function, its using ajax "method : 'post', i changed it to 'get' and pfc started working.

Now let me guess about the cause of the behavior. In punbb, all 'post' request must have an valid csrf_token that must be generated against the php file.

So without the csrf_token the 'post' request cant get through.

I dont know if you guys count it as bug, but i can suggest two ways of solving the problem.

1) Get a good IDE then search->replace all "method: 'post'" to "method: 'get'"

2) Hook into whole lot of code of pfc and add functionality of checking if its included in punbb then generate csrf_token and send post request with valid csrf_token.

Definitely 1st one is easier, but i want to know, "Doest pfc's php scripts listen to $_REQEST ? or $_POST or $_GET ?
I'm asking that because if i changed all 'post' to 'get', and cfc's php scripts are listening to $_POST then everything will be messed up.

Any better idea from you guys ?
sarim
New member
 
Posts: 1
Joined: Fri Jun 10, 2011 10:10 am
Top

Postby re*s.t.a.r.s.*2 » Fri Jun 10, 2011 2:09 pm

Hi,

I dont think is a bug, but instead is the integration creator that needs to take that in account, if you know the CMS and that CMS has a good security protocol then you need to code it with the integration to get the chat to work...

The chat wasn't created for one only CMS but to be used for so many more ...
So if you know what to do, make it happen ...


regards..
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top


Post a reply
2 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 27 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub