Skip to content

Conversation

@tomaszkane
Copy link
Contributor

Page was changed.

@github-actions
Copy link

Pull request artifacts

Bridge Context Status
Cdaction 1 untitled (current) Bridge returned error 404! (20344)
Type: HttpException
Message: https://cdaction.pl/najnowsze resulted in 404 Not Found
Cdaction 1 untitled (pr) ✔️

last change: Saturday 2025-09-13 13:12:30

$newsJson = $html->find('script#__NEXT_DATA__', 0)->innertext;
if (!$newsJson = json_decode($newsJson)) {
if ($this->getInput('category') === 'feed') {
$xml = simplexml_load_file($feedUrl);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to drop usage of this function? because it has security implications

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, you mean simplexml_load_file? I need to load https://cdaction.pl/feed/ it's XML with all needed data.
I can add some tweaks, like flags LIBXML_NONET | LIBXML_NOERROR | LIBXML_NOWARNING and validate if file is really a xml. Any other suggesions?

Copy link
Contributor

@Mynacol Mynacol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the Najnowsze (wszystkie) category (which only gets the website-provided feed and uses the already remarked simplexml_load_file function, this bridge throws (at least now) only errors:

Details
Type: ErrorException
Code: 0
Message: Attempt to read property "plaintext" on null
File: bridges/CdactionBridge.php
Line: 53
Trace
#0 index.php(73): RssBridge->main()
#1 lib/RssBridge.php(39): RssBridge->{closure:RssBridge::main():37}()
#2 lib/RssBridge.php(37): BasicAuthMiddleware->__invoke()
#3 middlewares/BasicAuthMiddleware.php(13): RssBridge->{closure:RssBridge::main():37}()
#4 lib/RssBridge.php(37): CacheMiddleware->__invoke()
#5 middlewares/CacheMiddleware.php(44): RssBridge->{closure:RssBridge::main():37}()
#6 lib/RssBridge.php(37): ExceptionMiddleware->__invoke()
#7 middlewares/ExceptionMiddleware.php(17): RssBridge->{closure:RssBridge::main():37}()
#8 lib/RssBridge.php(37): SecurityMiddleware->__invoke()
#9 middlewares/SecurityMiddleware.php(19): RssBridge->{closure:RssBridge::main():37}()
#10 lib/RssBridge.php(37): MaintenanceMiddleware->__invoke()
#11 middlewares/MaintenanceMiddleware.php(10): RssBridge->{closure:RssBridge::main():37}()
#12 lib/RssBridge.php(37): TokenAuthenticationMiddleware->__invoke()
#13 middlewares/TokenAuthenticationMiddleware.php(10): RssBridge->{closure:RssBridge::main():33}()
#14 lib/RssBridge.php(34): DisplayAction->__invoke()
#15 actions/DisplayAction.php(54): DisplayAction->createResponse()
#16 actions/DisplayAction.php(89): CdactionBridge->collectData()
#17 bridges/CdactionBridge.php(53): {closure:/home/paul/projects/rss-bridge/index.php:26}()
#18 bridges/CdactionBridge.php(53) 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants