Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot pad with '/' in title #14

Closed
ynnk opened this issue Oct 9, 2013 · 11 comments
Closed

cannot pad with '/' in title #14

ynnk opened this issue Oct 9, 2013 · 11 comments

Comments

@ynnk
Copy link

ynnk commented Oct 9, 2013

Probably a etherpad-lite bug, but affect also your project

  • create a pad either in etherpad lite or etherpad admin named 'fail/json'

you cannot acces the pad nor delete it.

  • url look like /pad/p/fail/&iejson
  • should remove the last '/' to work /pad/p/fail&iejson

ynnk

@JohnMcLear
Copy link

afaik pad ids should be sanitized, the api should return a failure or return a sanitized padid when you make this.

@ynnk
Copy link
Author

ynnk commented Oct 13, 2013

So i need to open an issue in etherpad-lite ?

@JohnMcLear
Copy link

nope, prolly needs resolving here

@ldidry
Copy link
Owner

ldidry commented Oct 14, 2013

Sure. I'll take a look tonight.

@ynnk
Copy link
Author

ynnk commented Oct 14, 2013

any ideas on how to remove pads created with wrong ids ?
i tryed removing entries in redis
$ redis-cli keys 'pad:*fail*' | cut -d')' -f1 | xargs redis-cli del
... but pads are still listed

Thx Luc & John

@ldidry ldidry closed this as completed in c243ad7 Oct 15, 2013
@ldidry
Copy link
Owner

ldidry commented Oct 15, 2013

Install URI::Encode via cpan or liburi-encode-perl in Debian or Ubuntu cause it's now a dependancy.

@JohnMcLear :

the api should return a failure or return a sanitized padid when you make this.

No, it's not returning a sanitized padid :

curl "http://127.0.0.1:1234/api/1/createPad?apikey=xxx&padID=foo/o"
{"code":0,"message":"ok","data":null}#

ldidry added a commit that referenced this issue Oct 15, 2013
Due to #14 fix, URI::Encode is now a dependancy
@ldidry
Copy link
Owner

ldidry commented Oct 15, 2013

shit, wait. some url problems

@ldidry ldidry reopened this Oct 15, 2013
@ldidry ldidry closed this as completed in 7414f58 Oct 15, 2013
@ldidry
Copy link
Owner

ldidry commented Oct 15, 2013

@ynnk : You'll be able to delete your bad pads from etherpad::admin now 😃

@ynnk
Copy link
Author

ynnk commented Oct 16, 2013

Bjr Luc

Actually this patch is not enough

  • i can t remove old pads created with '/' or '&' in names
    maybe it related , but i tried to delete keys from redis before your commited a patch. ( see upper comment )
    but all theses pads can be edited and saved in etherpad-lite.
  • creating a new pad from etherpad-lite named test&fail
    it works you can edit and save,
    but test&fail is not deletable from etherpad-admin url is /pad/p/test%26fail3

for all case api (message in boostrap style ) says that the pad has been deleted

yk

@ldidry
Copy link
Owner

ldidry commented Oct 17, 2013

Indeed, with & you can't see or delete a pad. I'll see that.

@ldidry
Copy link
Owner

ldidry commented Oct 19, 2013

Ok. the '&' thing was Etherpad::API fault.
I uploaded version 0.10 to the CPAN right now, so you have to wait a little bit to be able to upgrade.

Don't forgot to restart etherpad-admin after upgrading Etherpad::API.

I hope it will be ok for you (it was ok for me, but who knows ?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants