util.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:graph-data-experiment 作者: occrp-attic 项目源码 文件源码
def is_safe_url(target):
    ref_url = urlparse(request.host_url)
    test_url = urlparse(urljoin(request.host_url, target))
    return test_url.scheme in ('http', 'https') and \
        ref_url.netloc == test_url.netloc
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号