Parcourir la source

Merge pull request #2894 from shockey/bug/2763-malformed-security-render-error

Protect AuthorizeOperationBtn from malformed security values
bubble
shockey il y a 7 ans
committed by GitHub
Parent
révision
f7c5515dff
7 fichiers modifiés avec 26 ajouts et 18 suppressions
  1. +9
    -9
      dist/swagger-ui-bundle.js
  2. +1
    -1
      dist/swagger-ui-bundle.js.map
  3. +6
    -6
      dist/swagger-ui.js
  4. +1
    -1
      dist/swagger-ui.js.map
  5. +4
    -0
      src/core/components/auth/authorize-operation-btn.jsx
  6. +4
    -0
      src/core/plugins/auth/selectors.js
  7. +1
    -1
      src/core/plugins/view/root-injects.js

+ 9
- 9
dist/swagger-ui-bundle.js
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 1
- 1
dist/swagger-ui-bundle.js.map Voir le fichier

@@ -1 +1 @@
{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;AAu/FA;AA6+FA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0dA;;;;;;AAoIA;AAk7FA;AAmtCA;;;;;AA0uIA;AA66IA;AA27FA;AAuwGA;AAilFA;AAikFA;AAs9CA;AA8jDA;AA2qCA;AA4tEA;AAgkIA;;;;;;;;;;;;;;AAw4GA;AAyoIA;AAiuJA;AA8kHA;AAonGA;AAukEA;AA02DA;AAyxDA;AAw6BA;;;;;;AA8vEA;AA+zFA;;;;;AA23CA;AA2qFA;AAq2CA;AA0kCA;AAs/CA;AA0wEA;AA49FA;;;;;;;;;AA20BA;AA2zIA;AAi4DA;AA6tDA","sourceRoot":""}
{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;AAu/FA;AA6+FA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0dA;;;;;;AAoIA;AAk7FA;AAmtCA;;;;;AA0uIA;AA66IA;AA27FA;AAuwGA;AAilFA;AAikFA;AAs9CA;AA8jDA;AA2qCA;AA4tEA;AAgkIA;;;;;;;;;;;;;;AAw4GA;AAyoIA;AAiuJA;AA8kHA;AAonGA;AAukEA;AA02DA;AAyxDA;AAw6BA;;;;;;AA8vEA;AAm0FA;;;;;AA23CA;AA2qFA;AAw2CA;AA2kCA;AAq/CA;AAwwEA;AA48FA;;;;;;;;;AA81BA;AA2zIA;AAi4DA;AA6tDA","sourceRoot":""}

+ 6
- 6
dist/swagger-ui.js
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 1
- 1
dist/swagger-ui.js.map Voir le fichier

@@ -1 +1 @@
{"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;;;;;;AAuwCA;AAoyHA;AA2wHA;AA07FA;AA+nCA;AAohCA;AAghCA;AAk4BA","sourceRoot":""}
{"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;;;;;;AAuwCA;AAoyHA;AA2wHA;AA07FA;AAmoCA;AAghCA;AA0gCA;AAw4BA","sourceRoot":""}

+ 4
- 0
src/core/components/auth/authorize-operation-btn.jsx Voir le fichier

@@ -16,6 +16,10 @@ export default class AuthorizeOperationBtn extends React.Component {

let isAuthorized = authSelectors.isAuthorized(security)

if(isAuthorized === null) {
return null
}

return (
<button className={isAuthorized ? "authorization__btn locked" : "authorization__btn unlocked"} onClick={ this.onClick }>
<svg width="20" height="20">


+ 4
- 0
src/core/plugins/auth/selectors.js Voir le fichier

@@ -67,6 +67,10 @@ export const authorized = createSelector(
export const isAuthorized = ( state, securities ) =>( { authSelectors } ) => {
let authorized = authSelectors.authorized()

if(!List.isList(securities)) {
return null
}

return !!securities.toJS().filter( ( security ) => {
let isAuthorized = true



+ 1
- 1
src/core/plugins/view/root-injects.js Voir le fichier

@@ -74,7 +74,7 @@ const createClass = component => React.createClass({
const Fallback = ({ name }) => <div style={{ // eslint-disable-line react/prop-types
padding: "1em",
"color": "#aaa"
}}>😱 <i>Could not render { name || name === "t" ? name : "this component" }, see the console.</i></div>
}}>😱 <i>Could not render { name === "t" ? "this component" : name }, see the console.</i></div>

const wrapRender = (component) => {
const isStateless = component => !(component.prototype && component.prototype.isReactComponent)


Chargement…
Annuler
Enregistrer