Skip to content
This repository has been archived by the owner on Oct 6, 2021. It is now read-only.

Commit

Permalink
Pre-1.3.0 release code review results.
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Aug 29, 2016
1 parent 7474630 commit 7350423
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 33 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Version 1.3.0 (Not released yet)
## Version 1.3.0 - 2016-08-29

* Significant UI/UX improvements.
* Redesigned the Bridge UI to be more suitable for a control panel.
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ if your company requires one.
4. [Designed by progressive-minded application security professionals.](https://github.com/paragonie/airship-docs/blob/master/en-us/WHY.md#4-designed-by-progressive-minded-application-security-professionals)
5. [Our Gear system allows the framework to be extended.](https://github.com/paragonie/airship-docs/blob/master/en-us/WHY.md#5-our-gear-system-allows-the-framework-to-be-extended)

See [how the out-of-the-box security of CMS Airship compares to WordPress, Drupal, or Joomla](https://paragonie.com/project/airship).

## Documentation

See [paragonie/airship-docs](https://github.com/paragonie/airship-docs).
Expand Down
24 changes: 8 additions & 16 deletions src/Cabin/Bridge/ConfigFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
BoolFilter,
InputFilterContainer,
IntFilter,
StringFilter
StringFilter,
WhiteList
};

/**
Expand All @@ -28,21 +29,12 @@ public function __construct()
->addFilter('config_extra.board.enabled', new BoolFilter())
->addFilter(
'config_extra.editor.default-format',
(new StringFilter())
->setDefault('Rich Text')
->addCallback(
function ($choice): string {
switch ($choice) {
case 'HTML':
case 'Markdown':
case 'Rich Text':
case 'RST':
return $choice;
default:
return 'Rich Text';
}
}
)
(new WhiteList(
'HTML',
'Markdown',
'Rich Text',
'RST'
))->setDefault('Rich Text')
)
->addFilter('config_extra.recaptcha.secret-key', new StringFilter())
->addFilter('config_extra.recaptcha.site-key', new StringFilter())
Expand Down
11 changes: 8 additions & 3 deletions src/Cabin/Bridge/Filter/Blog/EditPostFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
IntFilter,
InputFilterContainer,
StringArrayFilter,
StringFilter
StringFilter,
WhiteList
};

/**
Expand All @@ -28,8 +29,12 @@ public function __construct()
->addFilter('description', new StringFilter())
->addFilter(
'format',
(new StringFilter())
->setDefault('Rich Text')
(new WhiteList(
'HTML',
'Markdown',
'Rich Text',
'RST'
))->setDefault('Rich Text')
)
->addFilter('metadata', new StringArrayFilter())
->addFilter(
Expand Down
13 changes: 11 additions & 2 deletions src/Cabin/Bridge/Filter/Blog/EditSeriesFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
ArrayFilter,
IntFilter,
InputFilterContainer,
StringFilter
StringFilter,
WhiteList
};

/**
Expand All @@ -28,7 +29,15 @@ public function __construct()
)
->addFilter('author', new IntFilter())
->addFilter('preamble', new StringFilter())
->addFilter('format', new StringFilter())
->addFilter(
'format',
(new WhiteList(
'HTML',
'Markdown',
'Rich Text',
'RST'
))->setDefault('Rich Text')
)
->addFilter('config', new ArrayFilter())
->addFilter('items', new StringFilter());
}
Expand Down
11 changes: 8 additions & 3 deletions src/Cabin/Bridge/Filter/Blog/NewPostFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
IntFilter,
InputFilterContainer,
StringArrayFilter,
StringFilter
StringFilter,
WhiteList
};

/**
Expand All @@ -28,8 +29,12 @@ public function __construct()
->addFilter('description', new StringFilter())
->addFilter(
'format',
(new StringFilter())
->setDefault('Rich Text')
(new WhiteList(
'HTML',
'Markdown',
'Rich Text',
'RST'
))->setDefault('Rich Text')
)
->addFilter('published', new StringFilter())
->addFilter('metadata', new StringArrayFilter())
Expand Down
12 changes: 10 additions & 2 deletions src/Cabin/Bridge/Filter/Blog/NewSeriesFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
ArrayFilter,
IntFilter,
InputFilterContainer,
StringFilter
StringFilter,
WhiteList
};

/**
Expand All @@ -28,7 +29,14 @@ public function __construct()
)
->addFilter('author', new IntFilter())
->addFilter('preamble', new StringFilter())
->addFilter('format', new StringFilter())
->addFilter('format',
(new WhiteList(
'HTML',
'Markdown',
'Rich Text',
'RST'
))->setDefault('Rich Text')
)
->addFilter('config', new ArrayFilter())
->addFilter('items', new StringFilter());
}
Expand Down
2 changes: 1 addition & 1 deletion src/Cabin/Bridge/Landing/Cabins.php
Original file line number Diff line number Diff line change
Expand Up @@ -375,4 +375,4 @@ protected function setTemplateExtraData(string $cabin)
'bridge-link-cabin-' . $cabin . '-manage'
);
}
}
}
2 changes: 1 addition & 1 deletion src/Cabin/Bridge/Lens/cargo/bridge_authors_edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@
</div>
</div>
</div>
</form>
</form>
2 changes: 1 addition & 1 deletion src/Cabin/Bridge/public/bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ $(document).ready(function () {
$("body").data('activelink'),
$("body").data('activesubmenu')
)
});
});
2 changes: 0 additions & 2 deletions src/Cabin/Hull/Landing/BlogPosts.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Airship\Cabin\Hull\Blueprint\Blog;
use Airship\Cabin\Hull\Filter\BlogPosts\CommentFilter;
use Airship\Engine\Security\Util;
use Airship\Engine\State;

require_once __DIR__.'/init_gear.php';

Expand Down Expand Up @@ -441,7 +440,6 @@ public function listMonth(string $year, string $month)
*/
public function listYear(string $year)
{
$state = State::instance();
list($offset, $limit) = $this->getOffsetAndLimit();
$count = $this->blog->countByYear($year);
$blogRoll = $this->blog->listByYear(
Expand Down
2 changes: 1 addition & 1 deletion src/Cabin/Hull/config/templates/config.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
"secret-key": {{ config['recaptcha']['secret-key']|je }},
"site-key": {{ config['recaptcha']['site-key']|je }}
}
}
}

0 comments on commit 7350423

Please sign in to comment.