You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2020/04/23 19:46:10 UTC

[couchdb] branch mango-bookmark-3.0.x created (now 76fd504)

This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a change to branch mango-bookmark-3.0.x
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


      at 76fd504  safer binary_to_term in mango_json_bookmark

This branch includes the following new commits:

     new 76fd504  safer binary_to_term in mango_json_bookmark

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[couchdb] 01/01: safer binary_to_term in mango_json_bookmark

Posted by rn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch mango-bookmark-3.0.x
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 76fd50462471beb7481776670c698ee9f3e98071
Author: Robert Newson <rn...@apache.org>
AuthorDate: Thu Apr 23 19:46:00 2020 +0100

    safer binary_to_term in mango_json_bookmark
---
 src/mango/src/mango_json_bookmark.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mango/src/mango_json_bookmark.erl b/src/mango/src/mango_json_bookmark.erl
index 97f81cf..ba97cc1 100644
--- a/src/mango/src/mango_json_bookmark.erl
+++ b/src/mango/src/mango_json_bookmark.erl
@@ -54,7 +54,7 @@ unpack(nil) ->
     nil;
 unpack(Packed) ->
     try
-        Bookmark = binary_to_term(couch_util:decodeBase64Url(Packed)),
+        Bookmark = binary_to_term(couch_util:decodeBase64Url(Packed), [safe]),
         verify(Bookmark)
     catch _:_ ->
         ?MANGO_ERROR({invalid_bookmark, Packed})
@@ -68,4 +68,4 @@ verify(Bookmark) when is_list(Bookmark) ->
 verify(_Bookmark) ->
     throw(invalid_bookmark).
 
-   
\ No newline at end of file
+