-
Notifications
You must be signed in to change notification settings - Fork 12
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
Feature Request -- Allow using your own IDs #23
Comments
+1 this would be very useful |
@turnerd10 I've forked this repo and added this feature, see https://github.com/blahgeek/shorty |
Hey, great someone finally addresses this issue. Contributions to these apps are really welcome. So I am looking forward to your results! |
@blahgeek: any news? |
As we discussed with @arkascha on IRC, this could be done in a way that doesn't disturb the current URL generation[1] and functionality[2]. This is a resume of (what I believe will be) the best way of implementing this issue, either for anyone that wants to help implementing it or just for me if I have some free time in the future to do it. IntroductionHere are some details. If the user wants to generate a shorty URL he could:
Functionality
Yes, having 2 different URLs might be a problem if we're using some RewriteRule. For that reason, the service should always accept a user= parameter. I can't think of any other reason not to like this (unless that... the url gets too long?).
That way, users can keep using the same URL syntax as before which agrees with what I said before ([1]). And people can still use only 1 RewriteRule, for example:
People can customize this to begin with username (which I prefer):
Or something like that... I'm really bad with RewriteRules IssuesSecurity@arkascha mentioned several times that this might create some security (or better said: a privacy) issue. We can't control how users are going to use the system. We're limited to offer the functionality (yet it must be secure from our end). When a user creates a custom ID for a public shorty, for example, named "passwords" where he stores all his websites/system passwords (which can be accessed via public.php?service=shorty_relay&id=passwords&user=stupidUser) - there's nothing we can do about it, can we? If we ignore the above described case, everything should be secure enough depending on what 'word/phrase' the user choses for his customID (if it's easily guessable for example) and the content he's sharing. Also, the user is always offered the default random generated ID which shorty already uses[2]. Implementation@arkascha mentioned that there might be a problem implementing all this without breaking the rest of the backends. |
@Phr33d0m: thanks for condensing our exchange! 1.) the Shorty keys are not random at all, that would allow collisions. But this details does not have any effect on your thoughts, so we can just ignore it here... If this results in not being able to add the users identity to the generated url then the main objection against such custom keys is a security/privacy issue. I am not at all concerned about shortened urls being guessed by attackers. Shortys are generated to be published, so relying on a non-guessable url is plain stupid. If users rely on the cryptic keys to protect their content then I absolutely agree with you that this is not our problem. I'd love to see this feature implement somehow, but currently for me the disadvantages, threads and open questions simply outweight the feature and easy of use. About this feature breaking the use of other backends? Not sure actually, depends on the implementation. It certainly would make the implementation, the dialogs and thus the usage more complex which is not desirable. I'd say it boils down to having a more dynamic dialog which relects the features of the backend currently in use by the user. This is kind of ugly, since it breaks the currently clean abstraction of the backend. But it should be possible. So sorry if I break things down here. But for me the questions are not yet answered. And I hesitate to implement such feature with unanswered questions and issues.... |
I finally came up with an alternative approach that looks quite elegant to me: a second plugin called 'Shorty-Alias' (there already is the 'Shorty-Tracking' plugin for Shorty). If enabled, it should allow to define a user specified alias which will indeed result in a second url to access a given Shorty, jut as Phr33d0m suggested above. Unfortunately I cannot invest time into this right now. Maybe someone else will give it a try? |
My request is to allow the ability to make ones own shorty_id instead of the generated one.
Now to check if one is used it could be placed in some sort of database and checked to see if it was there.
And if a user deleted that certain one, only the user that created it could add it again.
Maybe changing a value of itself in the database as to being "deleted" but already used. Have it redirect to a 404 of some sort if "deleted"
Limiting the length of the id might also be a factor, or how many a user can use.
The text was updated successfully, but these errors were encountered: