1.修复授权码为一次,超级签苹果包下载失败问题

2.修复私有下载页跳转不显示页面问题
pull/26/merge
isummer 2 years ago
parent 2c67305f8a
commit 42478f21d9
  1. 5
      fir_ser/api/utils/modelutils.py
  2. 5
      fir_ser/common/libs/mp/wechat.py
  3. 2
      fir_ser/common/utils/download.py
  4. 10
      fir_ser/xsign/views/receiveudids.py

@ -323,4 +323,7 @@ def get_user_storage_obj(user_obj, default=False):
def get_preview_short_config(user_obj, short): def get_preview_short_config(user_obj, short):
return f"{'#/' if UserConfig(user_obj).PREVIEW_ROUTE_HASH else ''}{short}" if user_obj:
return f"{'#/' if UserConfig(user_obj).PREVIEW_ROUTE_HASH else ''}{short}"
else:
return f"{'#/' if Config.PREVIEW_ROUTE_HASH else ''}{short}"

@ -72,11 +72,6 @@ def create_menu(menu_json=None):
"name": "官方地址", "name": "官方地址",
"key": "flyapps" "key": "flyapps"
}, },
{
"type": "view",
"name": "留言反馈",
"url": "https://flyapps.cn/gbook/"
},
{ {
"type": "click", "type": "click",
"name": "查询当前绑定", "name": "查询当前绑定",

@ -125,7 +125,7 @@ def get_app_download_url(request, res, app_id, short, password, release_id, is_d
logger.info(f'app download url :{res.data}') logger.info(f'app download url :{res.data}')
if download_url != "" and "mobileconifg" not in download_url: if download_url != "" and "mobileconifg" not in download_url:
if not check_app_download_token(app_obj.get("need_password"), is_download, app_id, password): if not check_app_download_token(app_obj.get("need_password"), is_download, app_id, password, bool(udid)):
res.code = 1006 res.code = 1006
res.msg = '下载授权码有误' res.msg = '下载授权码有误'
return res return res

@ -15,7 +15,7 @@ from rest_framework.views import APIView
from api.models import Apps, AppDownloadToken from api.models import Apps, AppDownloadToken
from api.utils.modelutils import get_redirect_server_domain, add_remote_info_from_request, \ from api.utils.modelutils import get_redirect_server_domain, add_remote_info_from_request, \
get_app_download_uri get_app_download_uri, get_preview_short_config
from api.utils.response import BaseResponse from api.utils.response import BaseResponse
from common.base.baseutils import get_real_ip_address, make_random_uuid, get_server_domain_from_request, AesBaseCrypt from common.base.baseutils import get_real_ip_address, make_random_uuid, get_server_domain_from_request, AesBaseCrypt
from common.cache.storage import TaskStateCache from common.cache.storage import TaskStateCache
@ -56,12 +56,16 @@ class IosUDIDView(APIView):
stream_f = str(request.body) stream_f = str(request.body)
format_udid_info = udid_bytes_to_dict(stream_f) format_udid_info = udid_bytes_to_dict(stream_f)
logger.info(f"short {short} receive new udid {format_udid_info}") logger.info(f"short {short} receive new udid {format_udid_info}")
org_short = short
short = get_preview_short_config(None, short)
server_domain = get_redirect_server_domain(request) server_domain = get_redirect_server_domain(request)
try: try:
app_obj = Apps.objects.filter(short=short, app_id=app_id).first() app_obj = Apps.objects.filter(short=short, app_id=app_id).first()
if app_obj: if app_obj:
user_obj = app_obj.user_id
short = get_preview_short_config(user_obj, short)
if p_token and verify_token(p_token, app_obj.app_id, True): if p_token and verify_token(p_token, app_obj.app_id, True):
server_domain = get_app_download_uri(request, app_obj.user_id, app_obj, preview=False) server_domain = get_app_download_uri(request, user_obj, app_obj, preview=False)
if app_obj.issupersign and app_obj.user_id.supersign_active: if app_obj.issupersign and app_obj.user_id.supersign_active:
res = check_app_permission(app_obj, BaseResponse()) res = check_app_permission(app_obj, BaseResponse())
if res.code != 1000: if res.code != 1000:
@ -76,7 +80,7 @@ class IosUDIDView(APIView):
# return Response('ok') # return Response('ok')
data = { data = {
'format_udid_info': format_udid_info, 'format_udid_info': format_udid_info,
'short': short, 'short': org_short,
'app_id': app_id, 'app_id': app_id,
'client_ip': client_ip, 'client_ip': client_ip,
'r_token': make_token(app_obj.app_id, time_limit=60, key='receive_udid', force_new=True) 'r_token': make_token(app_obj.app_id, time_limit=60, key='receive_udid', force_new=True)

Loading…
Cancel
Save