aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bridges/YoutubeBridge.php7
-rw-r--r--config.default.ini.php9
-rw-r--r--lib/bootstrap.php4
-rw-r--r--lib/simplehtmldom/simple_html_dom.php5
4 files changed, 12 insertions, 13 deletions
diff --git a/bridges/YoutubeBridge.php b/bridges/YoutubeBridge.php
index 647b1c42..12cdaec4 100644
--- a/bridges/YoutubeBridge.php
+++ b/bridges/YoutubeBridge.php
@@ -1,12 +1,5 @@
<?php
-/**
-* RssBridgeYoutube
-* Returns the newest videos
-* WARNING: to parse big playlists (over ~90 videos), you need to edit simple_html_dom.php:
-* change: define('MAX_FILE_SIZE', 600000);
-* into: define('MAX_FILE_SIZE', 900000); (or more)
-*/
class YoutubeBridge extends BridgeAbstract
{
const NAME = 'YouTube Bridge';
diff --git a/config.default.ini.php b/config.default.ini.php
index 1045d6c3..25f35508 100644
--- a/config.default.ini.php
+++ b/config.default.ini.php
@@ -46,7 +46,11 @@ enable_debug_mode = false
; Whether to enable maintenance mode. If enabled, feed requests receive 503 Service Unavailable
enable_maintenance_mode = false
+; Max file size for simple_html_dom in bytes (10000000 => 10 MB)
+max_file_size = 10000000
+
[http]
+
; Operation timeout in seconds
timeout = 15
@@ -70,6 +74,7 @@ type = "file"
custom_timeout = false
[admin]
+
; Advertise an email address where people can reach the administrator.
; This address is displayed on the main page, visible to everyone!
; "" = Disabled (default)
@@ -86,6 +91,7 @@ telegram = ""
donations = true
[proxy]
+
; The HTTP proxy to tunnel requests through
; https://curl.se/libcurl/c/CURLOPT_PROXY.html
; "" = Proxy disabled (default)
@@ -135,6 +141,7 @@ report_limit = 1
; --- Cache specific configuration ---------------------------------------------
[FileCache]
+
; The root folder to store files in.
; "" = Use the cache folder in the repository (default)
path = ""
@@ -142,6 +149,7 @@ path = ""
enable_purge = true
[SQLiteCache]
+
; Filepath of the sqlite db file
file = "cache.sqlite"
; Whether to actually delete data when purging
@@ -150,6 +158,7 @@ enable_purge = true
timeout = 5000
[MemcachedCache]
+
host = "localhost"
port = 11211
diff --git a/lib/bootstrap.php b/lib/bootstrap.php
index 36b13e19..8a7c62a1 100644
--- a/lib/bootstrap.php
+++ b/lib/bootstrap.php
@@ -7,10 +7,6 @@ if (is_file(__DIR__ . '/../vendor/autoload.php')) {
const PATH_LIB_CACHES = __DIR__ . '/../caches/';
const PATH_CACHE = __DIR__ . '/../cache/';
-// Allow larger files for simple_html_dom
-// todo: extract to config (if possible)
-const MAX_FILE_SIZE = 10000000;
-
// Files
$files = [
__DIR__ . '/../lib/html.php',
diff --git a/lib/simplehtmldom/simple_html_dom.php b/lib/simplehtmldom/simple_html_dom.php
index 170f6fb0..e8b3a727 100644
--- a/lib/simplehtmldom/simple_html_dom.php
+++ b/lib/simplehtmldom/simple_html_dom.php
@@ -114,8 +114,9 @@ function str_get_html(
if (empty($str)) {
throw new \Exception('Refusing to parse empty string input');
}
- if (strlen($str) > MAX_FILE_SIZE) {
- throw new \Exception('Refusing to parse too big input');
+
+ if (strlen($str) > Configuration::getConfig('system', 'max_file_size')) {
+ throw new \Exception('simple_html_dom: Refusing to parse too big input: ' . strlen($str));
}
return $dom->load($str, $lowercase, $stripRN);
0 Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/integration/bunjs-only-snippets/bundled (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2022-05-02[bun:ffi] ~20% faster FFI bindings for functions with argumentsGravatar Jarred Sumner 10-13/+220
2022-05-02Automatic CString supportGravatar Jarred Sumner 1-23/+78
2022-05-01[bun:ffi] Add wrapper for type coercionGravatar Jarred Sumner 1-2/+172
2022-05-01wip Buffer.fillGravatar Jarred Sumner 3-95/+167
2022-05-01Buffer.compare & Buffer.equalGravatar Jarred Sumner 2-5/+244
2022-05-01[bun.js] Improve `Buffer` creation perf a littleGravatar Jarred Sumner 2-8/+45
2022-05-01[bun.js] Implement `Buffer.concat`Gravatar Jarred Sumner 2-1/+78
2022-04-30Bump WebKitGravatar Jarred Sumner 1-0/+0
2022-04-30cleanupGravatar Jarred Sumner 5-2/+132
2022-04-30[bun.js] Implement `Buffer.from` and `Buffer.copy`Gravatar Jarred Sumner 12-520/+952
2022-04-30[bun ffi] Fix missing `"void"`Gravatar Jarred Sumner 1-0/+1
2022-04-30[bun ffi] Remove dependency on libtcc1.a and improve error messagesGravatar Jarred Sumner 3-36/+139
2022-04-30wipGravatar Jarred Sumner 9-272/+883
2022-04-30Update ffi-test.cGravatar Jarred Sumner 1-24/+35
2022-04-30aGravatar Jarred Sumner 1-0/+27
2022-04-29[bun:ffi] it worksGravatar Jarred Sumner 15-221/+1277
2022-04-29[bun.js] Implement unsafe.{`arrayBufferToPtr`, `arrayBufferFromPtr`, `bufferF...Gravatar Jarred Sumner 6-82/+187
2022-04-29[bun ffi] Support pointersGravatar Jarred Sumner 4-238/+179
2022-04-29[bun ffi] support `i32`, `i8`, `u8`, `u16`, `i16`, `u32`, `bool`Gravatar Jarred Sumner 5-159/+260
2022-04-29more tests for bufferGravatar Jarred Sumner 1-1/+165
2022-04-29add more to buffer implementationGravatar Jarred Sumner 14-157/+783
2022-04-29ffi test codeGravatar Jarred Sumner 2-26/+247
2022-04-29wipGravatar Jarred Sumner 10-16/+312
2022-04-29commit moreGravatar Jarred Sumner 3-0/+81