permission denied
Hi, first of all, great work of this version. really appreciate the hard work.
this should not be a bug, but should be argent to improve it. because I think it may be a common practise.
when I embed the window in my web page, I got permission denied. after a few hours struggling with the code, I figured out that when I set the sessionID to cookies, the iframe will not be able to read that sessionID because it resides in the parent window. my solution was to pass the sessionID as a url param to iframe. this solves the problem for reading pads. but does not solve that when I go to history and come back to the main page. also it is a problem when I export the pad....all these operations are denied.
besides above, I think passing params in iframe url for configuration(line number,controller etc) may not be a good practice to be used in web applications. because when you click the history button, the url becomes: 127.0.0.1:9001/p/test?shownumber=false/timeslider. I suggest these configuration should be done in the settings.json.
Thanks again for the excellent work. bingjie2680
Are you sure you can't pass cookies to iframes? Can't believe that. Maybe you just set the wrong domain for the cookie
The problem with the parameters is already fixed https://github.com/Pita/etherpad-lite/commit/7b8d48467feed49883e9331804bff466be6783d5
Hi, thanks for your quick response. my application runs on 127.0.0.1:80, I set the cookie to domain 127.0.0.1 and path to '/' while the etherpad lite runs on 127.0.0.1:9001, is there any trap here? thanks for your help.
are you using http only cookies?
no, I am not..should I use that?
I mean, cause the cookie is read at the javascript client side an send to the server. http only cookies can't be read by the client side
Can you come to freenode irc at #etherpad-lite-dev ?
Was there a solution to this? Possibly having the same problem, both site and etherpad are also hosted on 127.0.0.1. I am creating a session and setting the cookie as in the example_big.php that comes with the php class. When trying to view an embedded pad (group pad, private). Etherpad server throws back;
Authentication try failed:{"component":"pad","type":"CLIENT_READY","padId":"g.CvCtgCxIvV29Y2pB$w80i29j92f","sessionID":null,"password":null,"token":"t.to9pLOoA8wsAqah2Mg20","protocolVersion":2}
Unsure how to pass sessionID through iframe.
Got it sorted, Cookie was not being set correctly, tidied up my code, made sure setcookie() is being called before any output. Also changed setcookie params to,
setcookie('sessionID', $sessionID, $validUntil, '/');
As my etherpad lite install is in a higher directory than where i was setting the cookie so the default path was wrong.
Not an etherpad lite bug. When cookie is set correctly everything works as it should.
ok great
Hi, I encounter the same problem, I'm doing the tests as follows:
I downloaded the PHP library to make the connection with Etherpad locally, with example_big.php example, replace the values as:
$ Apikey = "The value is in the file APIKEY.txt" $ HOST = 'http://localhost:9001/p'; $ APIENDPOINT = 'http://localhost:9001/api';
When I do the test from the page: http://localhost/etherpad/example_big.php, the PAD is created, but when running tells me I have no privileges.
The only difference is the port, apache (80) etherpad (9001), I see the cookie is created on the first (80).
I have read several articles about this problem:
https://drupal.org/node/1437034 https://github.com/jhollinger/ruby-etherpad-lite/issues/5
I know you're question has already been solved, but it does not work properly the solution given by @ efault
Thanks for your attention and help.
Jorge Rubiano.
okay, so first up: which version did you try this against? -- updating might help..
Hi, thanks for the reply.
Etherpad's version I'm using is 1.2.11 (the latest version).
Thanks for your attention and help.
Jorge Rubiano.
"I see the cookie is created on the first (80)." -- you need to set the cookie, so it's visible for the website at $HOST