Passing base64 encoded strings in URL

前端 未结 10 1912
臣服心动
臣服心动 2020-11-22 03:11

Is it safe to pass raw base64 encoded strings via GET parameters?

10条回答
  •  半阙折子戏
    2020-11-22 04:05

    Yes and no.

    The basic charset of base64 may in some cases collide with traditional conventions used in URLs. But many of base64 implementations allow you to change the charset to match URLs better or even come with one (like Python's urlsafe_b64encode()).

    Another issue you may be facing is the limit of URL length or rather — lack of such limit. Because standards do not specify any maximum length, browsers, servers, libraries and other software working with HTTP protocol may define its' own limits.

提交回复
热议问题