![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : 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_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /opt/mattermost/client/ |
Upload File : |
{"version":3,"file":"9420.72d849ee701d4937cef1.js","mappings":"itBAuCe,MAAMA,UAAkBC,IAAAA,cAC5BC,WAAAA,CAAYC,GACfC,MAAMD,GAAOE,EAAA,oBAwBI,KACjB,MAAMC,EAAe,IAAIC,gBAAgBC,KAAKL,MAAMM,SAASC,QACvDC,EAAS,CACXC,aAAcN,EAAaO,IAAI,iBAC/BC,SAAUR,EAAaO,IAAI,aAC3BE,YAAaT,EAAaO,IAAI,gBAC9BG,MAAOV,EAAaO,IAAI,SACxBI,MAAOX,EAAaO,IAAI,UAG5BL,KAAKL,MAAMe,QAAQC,YAAYR,GAAQS,MACnCC,IAAmB,IAAlB,KAACC,EAAI,MAAEC,GAAMF,EACNC,GAAQA,EAAKE,SACbC,OAAOhB,SAASiB,KAAOJ,EAAKE,SACrBD,GACPf,KAAKmB,SAAS,CAACJ,MAAOA,EAAMK,SAChC,GAEP,IACJvB,EAAA,mBAEmB,KAChB,MAAMU,EAAe,IAAIR,gBAAgBC,KAAKL,MAAMM,SAASC,QAASG,IAAI,gBACtEE,IAAgBA,EAAYc,WAAW,aAAed,EAAYc,WAAW,YAC7EJ,OAAOhB,SAASiB,KAAOX,EAAc,wBAIzCe,EAAAA,EAAAA,KAAaC,QAAQ,SAAS,IAlD9BvB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iBlB,IAM1C3B,IAAAA,cAAA,OAAK6C,UAAS,aAAA4B,OAAeH,GAAiB,cAC1CtE,IAAAA,cAAA,SAAO6C,UAAU,iBACb7C,IAAAA,cAAA,KACI6C,UAAS,MAAA4B,OAAQL,GAAiB,2BACnC,IACFzC,IAjCF,IAmCD,EAEZmB,EAAA4B,UAAA,CAvEEf,KAAIgB,IAAAA,KACJrD,MAAKqD,IAAAA,KACLL,cAAaK,IAAAA,OACbP,cAAaO,IAAAA,OACbN,OAAMM,IAAAA,KACNR,OAAMQ,IAAAA,QAAAA,IAAAA,OAoEV,QAAe3E,IAAAA,KAAW8C,E","sources":["webpack://mattermost-webapp/./src/components/authorize/authorize.tsx","webpack://mattermost-webapp/./src/components/authorize/index.ts","webpack://mattermost-webapp/./src/components/form_error.tsx"],"sourcesContent":["// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React from 'react';\nimport type {ReactNode} from 'react';\nimport {FormattedMessage} from 'react-intl';\n\nimport type {OAuthApp} from '@mattermost/types/integrations';\n\nimport type {ActionResult} from 'mattermost-redux/types/actions';\n\nimport FormError from 'components/form_error';\n\nimport icon50 from 'images/icon50x50.png';\nimport {getHistory} from 'utils/browser_history';\n\nexport type Params = {\n responseType: string | null;\n clientId: string | null;\n redirectUri: string | null;\n state: string | null;\n scope: string | null;\n}\n\ntype Props = {\n location: {\n search: string;\n };\n actions: {\n getOAuthAppInfo: (clientId: string | null) => Promise<ActionResult<OAuthApp>>;\n allowOAuth2: (params: Params) => Promise<ActionResult<{redirect: string}>>;\n };\n}\n\ntype State = {\n app?: OAuthApp;\n error?: string;\n}\n\nexport default class Authorize extends React.PureComponent<Props, State> {\n public constructor(props: Props) {\n super(props);\n\n this.state = {};\n }\n\n public componentDidMount(): void {\n // if we get to this point remove the antiClickjack blocker\n const blocker = document.getElementById('antiClickjack');\n if (blocker && blocker.parentNode) {\n blocker.parentNode.removeChild(blocker);\n }\n const clientId = (new URLSearchParams(this.props.location.search)).get('client_id');\n if (clientId && !((/^[a-z0-9]+$/).test(clientId))) {\n return;\n }\n\n this.props.actions.getOAuthAppInfo(clientId).then(\n ({data}) => {\n if (data) {\n this.setState({app: data});\n }\n });\n }\n\n public handleAllow = (): void => {\n const searchParams = new URLSearchParams(this.props.location.search);\n const params = {\n responseType: searchParams.get('response_type'),\n clientId: searchParams.get('client_id'),\n redirectUri: searchParams.get('redirect_uri'),\n state: searchParams.get('state'),\n scope: searchParams.get('store'),\n };\n\n this.props.actions.allowOAuth2(params).then(\n ({data, error}) => {\n if (data && data.redirect) {\n window.location.href = data.redirect;\n } else if (error) {\n this.setState({error: error.message});\n }\n },\n );\n };\n\n public handleDeny = (): void => {\n const redirectUri = (new URLSearchParams(this.props.location.search)).get('redirect_uri');\n if (redirectUri && (redirectUri.startsWith('https://') || redirectUri.startsWith('http://'))) {\n window.location.href = redirectUri + '?error=access_denied';\n return;\n }\n\n getHistory().replace('/error');\n };\n\n public render(): ReactNode {\n const app = this.state.app;\n if (!app) {\n return null;\n }\n\n let icon;\n if (app.icon_url) {\n icon = app.icon_url;\n } else {\n icon = icon50;\n }\n\n let error;\n if (this.state.error) {\n error = (\n <div className='prompt__error form-group'>\n <FormError error={this.state.error}/>\n </div>\n );\n }\n\n return (\n <div className='container-fluid'>\n <div className='prompt'>\n <div className='prompt__heading'>\n <div className='prompt__app-icon'>\n <img\n alt={'prompt icon'}\n src={icon}\n width='50'\n height='50'\n />\n </div>\n <div className='text'>\n <FormattedMessage\n id='authorize.connectTitle'\n defaultMessage='Authorize <b>{appName}</b> to Connect to Your <b>Mattermost</b> User Account'\n values={{\n appName: app.name,\n b: (chunks: string) => <b>{chunks}</b>,\n }}\n />\n </div>\n </div>\n <p>\n <FormattedMessage\n id='authorize.modificationAccess'\n defaultMessage='The app <b>{appName}</b> would like the ability to access and modify your basic information.'\n values={{\n appName: app.name,\n b: (chunks: string) => <b>{chunks}</b>,\n }}\n />\n </p>\n <h2 className='prompt__allow'>\n <FormattedMessage\n id='authorize.allowAccess'\n defaultMessage='Allow <b>{appName}</b> access?'\n values={{\n appName: app.name,\n b: (chunks: string) => <b>{chunks}</b>,\n }}\n />\n </h2>\n <div className='prompt__buttons'>\n <button\n type='submit'\n className='btn btn-tertiary authorize-btn'\n onClick={this.handleDeny}\n >\n <FormattedMessage\n id='authorize.deny'\n defaultMessage='Deny'\n />\n </button>\n <button\n type='submit'\n className='btn btn-primary authorize-btn'\n onClick={this.handleAllow}\n >\n <FormattedMessage\n id='authorize.allow'\n defaultMessage='Allow'\n />\n </button>\n </div>\n {error}\n </div>\n </div>\n );\n }\n}\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport {connect} from 'react-redux';\nimport {bindActionCreators} from 'redux';\nimport type {Dispatch} from 'redux';\n\nimport {allowOAuth2, getOAuthAppInfo} from 'actions/admin_actions.jsx';\n\nimport Authorize from './authorize';\n\nfunction mapDispatchToProps(dispatch: Dispatch) {\n return {\n actions: bindActionCreators({\n getOAuthAppInfo,\n allowOAuth2,\n }, dispatch),\n };\n}\n\nexport default connect(null, mapDispatchToProps)(Authorize);\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React from 'react';\n\nconst TYPE_MODAL = 'modal';\nconst TYPE_BACKSTAGE = 'backstage';\n\n// accepts either a single error or an array of errors\ntype Props = {\n type?: React.ReactNode;\n error?: React.ReactNode;\n textClassName?: string;\n iconClassName?: string;\n margin?: boolean;\n errors?: React.ReactNode[];\n};\n\nconst EMPTY_ERROR_LIST: React.ReactNode[] = [];\n\nconst FormError: React.FC<Props> = ({\n error = null,\n errors = EMPTY_ERROR_LIST,\n iconClassName,\n margin,\n textClassName,\n type,\n}) => {\n if (!error && errors.length === 0) {\n return null;\n }\n\n // look for the first truthy error to display\n let message = error;\n\n if (!message) {\n for (const err of errors) {\n if (err) {\n message = err;\n }\n }\n }\n\n if (!message) {\n return null;\n }\n\n if (type === TYPE_MODAL) {\n return (\n <div className='form-group'>\n <label className='col-sm-12 has-error'>{message}</label>\n </div>\n );\n }\n\n if (type === TYPE_BACKSTAGE) {\n return (\n <div className='pull-left has-error'>\n <label className='control-label'>{message}</label>\n </div>\n );\n }\n\n if (margin) {\n return (\n <div className='form-group has-error'>\n <label className='control-label'>{message}</label>\n </div>\n );\n }\n\n return (\n <div className={`col-sm-12 ${textClassName || 'has-error'}`}>\n <label className='control-label'>\n <i\n className={`fa ${iconClassName || 'fa-exclamation-circle'}`}\n />{' '}\n {message}\n </label>\n </div>\n );\n};\n\nexport default React.memo(FormError);\n"],"names":["Authorize","React","constructor","props","super","_defineProperty","searchParams","URLSearchParams","this","location","search","params","responseType","get","clientId","redirectUri","state","scope","actions","allowOAuth2","then","_ref","data","error","redirect","window","href","setState","message","startsWith","getHistory","replace","componentDidMount","blocker","document","getElementById","parentNode","removeChild","test","getOAuthAppInfo","_ref2","app","render","icon","icon_url","icon50","className","FormError","alt","src","width","height","FormattedMessage","id","defaultMessage","values","appName","name","b","chunks","type","onClick","handleDeny","handleAllow","connect","dispatch","bindActionCreators","EMPTY_ERROR_LIST","errors","iconClassName","margin","textClassName","length","err","concat","propTypes","_pt"],"sourceRoot":""}