]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Use the same encoding for binary data as strings
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 26 Jan 2024 19:51:56 +0000 (13:51 -0600)
committerGitHub <noreply@github.com>
Fri, 26 Jan 2024 19:51:56 +0000 (13:51 -0600)
Closes #5285

src/lib/print.c

index 57455b6f30bf167abd138ac2281cd2b5d304d0c5..83aa26744bc5233e2efd60ff3c9c0588b6147379 100644 (file)
@@ -529,6 +529,7 @@ size_t vp_prints_value_json(char *out, size_t outlen, VALUE_PAIR const *vp, bool
 
        switch (vp->da->type) {
        case PW_TYPE_STRING:
+       case PW_TYPE_OCTETS:    
                for (q = vp->vp_strvalue; q < vp->vp_strvalue + vp->vp_length; q++) {
                        /* Indicate truncation */
                        if (freespace < 3) return outlen + 1;