mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-05-02 06:26:16 -04:00
extracting only the 16 hex characters of the query string as paste ID, addressing #396
This commit is contained in:
parent
cc53d95ed1
commit
79a858f176
5 changed files with 7 additions and 5 deletions
|
@ -745,7 +745,7 @@ jQuery.PrivateBin = (function($, sjcl, Base64, RawDeflate) {
|
|||
{
|
||||
if (id === null) {
|
||||
// Attention: This also returns the delete token inside of the ID, if it is specified
|
||||
id = window.location.search.substring(1);
|
||||
id = (window.location.search.match(/[a-z0-9]{16}/) || [''])[0];
|
||||
|
||||
if (id === '') {
|
||||
throw 'no paste id given';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue