HEX
Server: nginx/1.28.3
System: Linux ip-172-31-12-242 6.17.0-1007-aws #7~24.04.1-Ubuntu SMP Thu Jan 22 21:04:49 UTC 2026 x86_64
User: root (0)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/server/panel/BTPanel/static/js/config-legacy6.js
!function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){a(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function a(t,r,n){return(r=function(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==e(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function i(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var i=n&&n.prototype instanceof s?n:s,l=Object.create(i.prototype);return u(l,"_invoke",function(r,n,o){var a,i,u,s=0,l=o||[],f=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return a=t,i=0,u=e,p.n=r,c}};function d(r,n){for(i=r,u=n,t=0;!f&&s&&!o&&t<l.length;t++){var o,a=l[t],d=p.p,y=a[2];r>3?(o=y===n)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=r<2&&d<a[1])?(i=0,p.v=n,p.n=a[1]):d<y&&(o=r<3||a[0]>n||n>y)&&(a[4]=r,a[5]=n,p.n=y,i=0))}if(o||r>1)return c;throw f=!0,n}return function(o,l,y){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,y),i=l,u=y;(t=i<2?e:u)||!f;){a||(i?i<3?(i>1&&(p.n=-1),d(i,u)):p.n=u:p.v=u);try{if(s=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(f=p.n<0)?u:r.call(n,p))!==c)break}catch(t){a=e,i=1,u=t}finally{s=1}}return{value:t,done:f}}}(r,o,a),!0),l}var c={};function s(){}function l(){}function f(){}t=Object.getPrototypeOf;var p=[][n]?t(t([][n]())):(u(t={},n,function(){return this}),t),d=f.prototype=s.prototype=Object.create(p);function y(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,u(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=f,u(d,"constructor",f),u(f,"constructor",l),l.displayName="GeneratorFunction",u(f,o,"GeneratorFunction"),u(d),u(d,o,"Generator"),u(d,n,function(){return this}),u(d,"toString",function(){return"[object Generator]"}),(i=function(){return{w:a,m:y}})()}function u(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}u=function(e,t,r,n){function a(t,r){u(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(a("next",0),a("throw",1),a("return",2))},u(e,t,r,n)}function c(e,t,r,n,o,a,i){try{var u=e[a](i),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function s(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){c(a,n,o,i,u,"next",e)}function u(e){c(a,n,o,i,u,"throw",e)}i(void 0)})}}System.register(["./utils-lib-legacy.js?v=1777008528","./index-legacy118.js?v=1777008528","./base-lib-legacy.js?v=1777008528","./config-legacy.js?v=1777008528","./index-legacy3.js?v=1777008528","./useMethod-legacy2.js?v=1777008528","./useStore-legacy.js?v=1777008528","./form-item-legacy.js?v=1777008528","./__commonjsHelpers__-legacy.js?v=1777008528","./index-legacy119.js?v=1777008528","./index-legacy116.js?v=1777008528"],function(e,r){"use strict";var n,a,u,c,l,f,p,d,y,m,b,g,h,v,w,j,O,P,k,S,_,x,C,A,E,N,T,V,q,D,B,I,F,G;return{setters:[function(e){n=e.k,a=e.M,u=e.X,c=e.da,l=e.o,f=e.R,p=e.w,d=e.cP,y=e.K},function(e){m=e._},function(e){b=e.c,g=e.r,h=e.e,v=e.x,w=e.g,j=e.ap,O=e.j,P=e.k,k=e.q,S=e.v,_=e.p,x=e.Q,C=e.F,A=e.aV,E=e.z},function(e){N=e.z,T=e.A,V=e.B,q=e.C,D=e.D},function(e){B=e.g},function(e){I=e.s},function(e){F=e.g},function(e){G=e.F},null,null,null],execute:function(){var r=function(){var e=s(i().m(function e(t,r){return i().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,n({loading:"正在准备注册Passkey,请稍候...",request:N({origin:window.location.origin,name:t.name}),success:function(){var e=s(i().m(function e(t){var n;return i().w(function(e){for(;;)switch(e.n){case 0:if(console.log("创建Passkey第一步返回:",t),!t.data.hasOwnProperty("msg")){e.n=1;break}return a.request(t),e.a(2);case 1:return e.n=2,U(t.data);case 2:if(n=e.v){e.n=3;break}return e.a(2);case 3:return e.n=4,K(n,t.data.challenge,r);case 4:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()});case 1:return e.a(2)}},e)}));return function(t,r){return e.apply(this,arguments)}}(),U=function(){var e=s(i().m(function e(t){var r,n,u;return i().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,r={rp:t.rp,user:{id:J(t.user.id),name:t.user.name,displayName:t.user.displayName},challenge:J(t.challenge),pubKeyCredParams:t.pubKeyCredParams,authenticatorSelection:t.authenticatorSelection||{userVerification:"preferred",authenticatorAttachment:"platform",residentKey:"preferred"},attestation:t.attestation||"none",timeout:t.timeout||6e4,excludeCredentials:t.excludeCredentials||[]},t.excludeCredentials&&t.excludeCredentials.length>0&&(r.excludeCredentials=t.excludeCredentials.map(function(e){return o(o({},e),{},{id:J(e.id)})})),e.n=1,navigator.credentials.create({publicKey:r});case 1:if(n=e.v){e.n=2;break}throw new Error("用户取消了操作");case 2:return e.a(2,{id:n.id,rawId:M(n.rawId),response:{clientDataJSON:M(n.response.clientDataJSON),attestationObject:M(n.response.attestationObject)},type:n.type});case 3:return e.p=3,u=e.v,console.error("创建凭证错误:",u),"NotAllowedError"===u.name?a.error("验证失败,可能原因:<br>1、操作被取消<br>2、证书不匹配<br>3、设备不支持"):"InvalidStateError"===u.name?a.error("该用户已存在Passkey,请直接登录"):"SecurityError"===u.name?a.error("安全错误:请确保在安全的上下文中使用"):a.error("创建Passkey失败:"+u.message),e.a(2,null)}},e,null,[[0,3]])}));return function(t){return e.apply(this,arguments)}}(),K=function(){var e=s(i().m(function e(t,r,o){var u;return i().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,n({loading:"正在验证注册,请稍候...",request:T({credential:JSON.stringify(t),challenge:JSON.stringify(r)}),success:function(e){a.request({msg:e.msg,status:e.status}),e.status&&o()}});case 1:e.n=3;break;case 2:e.p=2,u=e.v,console.error("完成注册错误:",u);case 3:return e.a(2)}},e,null,[[0,2]])}));return function(t,r,n){return e.apply(this,arguments)}}(),J=function(e){for(var t=e.replace(/-/g,"+").replace(/_/g,"/"),r=window.atob(t),n=new Uint8Array(r.length),o=0;o<r.length;o++)n[o]=r.charCodeAt(o);return n.buffer},M=function(e){for(var t=new Uint8Array(e),r="",n=0;n<t.byteLength;n++)r+=String.fromCharCode(t[n]);return window.btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},z={class:"p-2rem"},R={class:"py-1.2rem flex items-center"},$={class:"flex items-center"};e("default",b({__name:"config",props:{compData:{default:function(){return{isSwitch:!1}}}},setup:function(e){var b,N,T=e,U=F().refs.panelConfig,K=g(!0),J=g(!1),M=[{content:"开启时需要面板配置有效的域名证书,自签证书或域名不匹配时均无法使用"},{content:"开启此功能后,请在安全的设备上绑定凭证信息"},{content:"域名变更、修改面板端口或改用免端口访问,都会导致登录凭证暂时失效,必须用与凭证匹配的网址访问才能正常登录"},{content:h("span",{class:"text-danger"},[v("Passkey登录失败的常见原因:操作被取消、证书不匹配、当前设备中无可用凭证、设备不支持")])}],H=function(e){return I(e?1:0)},L=w(function(){return[G("名称","name",{attrs:o(o({},{class:"!w-[280px]",clearable:!0}),{},{placeholder:"例如:我的MacBook / iPhone"}),rules:[{required:!0,message:"名称不能为空",trigger:"blur"}]})]}),Q=u({data:function(){return{}},options:L,submit:(b=s(i().m(function e(t,n,o){var a;return i().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,n();case 1:return e.n=2,r(t.value,function(){J.value=!1,ae()});case 2:e.n=4;break;case 3:e.p=3,a=e.v,console.error("添加Passkey错误:",a);case 4:return e.a(2,!1)}},e,null,[[0,3]])})),function(e,t,r){return b.apply(this,arguments)})}),W=Q.BtForm,X=Q.submit,Y=Q.param,Z=function(){var e=s(i().m(function e(t,r){return i().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,n({loading:"正在更新状态,请稍候...",request:D({passkey_id:t.id,status:r}),message:!0,success:function(){ae()}});case 1:return e.a(2)}},e)}));return function(t,r){return e.apply(this,arguments)}}(),ee=c({request:(N=s(i().m(function e(t){var r;return i().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,V(t);case 1:if(r=e.v,Array.isArray(r.data.data)){e.n=2;break}return e.a(2,{data:[],total:0});case 2:return U.value.passkey_status=r.data.is_enable,K.value&&T.compData.isSwitch&&(K.value=!1,r.data.data.length?I(1):ie()),e.a(2,{data:r.data.data,total:l(r.data.page)})}},e)})),function(e){return N.apply(this,arguments)}),columns:[{label:"凭证名称",prop:"name",showOverflowTooltip:!0,width:200},{label:"状态",prop:"status",width:100,render:function(e){return h(j,{size:"small",modelValue:e.status,"onUpdate:modelValue":function(t){return e.status=t},onChange:function(t){return Z(e,Number(t))}},null)}},{label:"适配网址",prop:"origin",showOverflowTooltip:!0},{label:"创建时间",prop:"created_at",width:180,render:function(e){return f(e.created_at)}},B([{title:"删除",onClick:function(e){return ue(e)}}])],extension:[]}),te=ee.BtTable,re=ee.BtPage,ne=ee.BtRefresh,oe=ee.BtSearch,ae=ee.refresh,ie=function(){if(/^[\d.]+$/.test(window.location.hostname))return a.error("当前访问地址非域名,无法使用Passkey登录,请使用绑定了有效证书的域名访问后再试。");Y.value.name="",J.value=!0},ue=function(){var e=s(i().m(function e(t){return i().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,p({title:"删除Passkey【".concat(t.name,"】"),content:"您确定要删除该Passkey吗?删除后将无法使用该Passkey登录。"});case 1:n({loading:"正在删除Passkey,请稍候...",request:q({passkey_id:t.id}),message:!0,success:function(){ae()}});case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}();return function(e,r){var n=A,o=E,a=m,i=d,u=y;return O(),P(C,null,[k("div",z,[h(n,{type:"info","show-icon":"",closable:!1},{title:S(function(){return t(r[2]||(r[2]=[k("div",{class:"leading-2rem text-small"},"基于 WebAuthn 技术的无密码登录方式,通过设备内置的生物识别或 PIN 码完成身份验证,更安全、更便捷。",-1)]))}),_:1}),k("div",R,[r[3]||(r[3]=k("span",{class:"mr-2rem"},"启用Passkey登录",-1)),h(_(j),{modelValue:_(U).passkey_status,"onUpdate:modelValue":r[0]||(r[0]=function(e){return _(U).passkey_status=e}),onChange:H},null,8,["modelValue"])]),h(a,null,{"header-left":S(function(){return[h(o,{type:"primary",onClick:ie},{default:S(function(){return t(r[4]||(r[4]=[v("添加Passkey",-1)]))}),_:1})]}),"header-right":S(function(){return[k("div",$,[h(_(oe),{placeholder:"请输入关键词搜索",class:"!w-[270px] mr-[10px]"}),h(_(ne))])]}),content:S(function(){return[h(_(te),{"max-height":300})]}),"footer-right":S(function(){return[h(_(re))]}),_:1}),h(i,{class:"mt-2rem",options:M})]),h(u,{title:"添加Passkey",area:46,modelValue:_(J),"onUpdate:modelValue":r[1]||(r[1]=function(e){return x(J)?J.value=e:null}),"show-footer":"",onConfirm:_(X)},{default:S(function(){return[h(_(W),{class:"p-[2rem]"})]}),_:1},8,["modelValue","onConfirm"])],64)}}}))}}})}();