Commit Graph

73 Commits

Author SHA1 Message Date
Azareal 304c246cb2 security: stop exempting video sites in frame-src on pages which don't have video embeds
perf: reduce allocs in action posts
perf: avoid allocing a map and slice for single reply posts when it is liked and the post also has an attachment.
perf: use hookgen for topic_reply_row_assign hook.
perf: stop unnecessarily indirecting r in topic_reply_row_assign hook.
perf: try optimising reqUserList logic in Topic.Replies()
2020-06-09 12:04:58 +10:00
Azareal 019efc8c62 add support for niconico videos
tweak tempra simple text attach padding
2020-06-08 22:19:32 +10:00
Azareal 8be3f79abb improve text file attachment blocks 2020-06-08 21:13:19 +10:00
Azareal a8702b617f initial AText 2020-06-08 17:04:47 +10:00
Azareal 6746c9c91b add audio player
add wav, oga, ogv, ogx file extensions
2020-05-05 18:10:19 +10:00
Azareal c32498d543 use a video player for uploaded videos
optimise the parser
2020-04-30 16:28:01 +10:00
Azareal bc16b724c2 avoid loading as many alerts outside of the bounding box 2020-03-31 22:33:40 +10:00
Azareal 48b0b410c9 add a few more parser tests
save bytes in the parser
save allocs in external image embeds in the parser
save alloc bytes in convos
2020-03-28 14:48:42 +10:00
Azareal cd66782129 push content type for opensearch
don't insert a last ip on installation
save bytes and allocs in the parser
add attach parser test cases
more benchmarks
2020-03-28 07:01:44 +10:00
Azareal 1191076c5b stop storing poll vote ips when anti-cheat is off
remove the PollStore.CastVote method
2020-02-19 15:17:12 +10:00
Azareal 0c1d6f0516 Add CreateProfileReply and AutoEmbed group permissions.
Log profile reply deletions in the moderator log.
Split the global permissions in the UI to make them easier to manage.
Experiment with showing group ID in group edit header.
Avoid loading groups multiple times for the same profile reply.

Initialise disabled IP log points to empty string rather than 0.

Add CreateProfileReply perm phrase.
Add AutoEmbed perm phrase.
Add panel_group_mod_permissions phrase.
Add panel_logs_mod_action_profile_reply_delete phrase.
2020-02-04 21:47:03 +10:00
Azareal 6935637867 Cascade delete attachments properly.
Cascade delete replied to topic events for replies properly.
Cascade delete likes on topic posts properly.
Cascade delete replies and their children properly.
Recalculate user stats properly when items are deleted.
Users can now unlike topic opening posts.
Add a recalculator to fix abnormalities across upgrades.
Try fixing a last_ip daily update bug.

Add Existable interface.
Add Delete method to LikeStore.
Add Each, Exists, Create, CountUser, CountMegaUser and CountBigUser methods to ReplyStore.
Add CountUser, CountMegaUser, CountBigUser methods to TopicStore.
Add Each method to UserStore.
Add Add, Delete and DeleteResource methods to SubscriptionStore.
Add Delete, DeleteByParams, DeleteByParamsExtra and AidsByParamsExtra methods to ActivityStream.
Add Exists method to ProfileReplyStore.

Add DropColumn, RenameColumn and ChangeColumn to the database adapters.

Shorten ipaddress column names to ip.
- topics table.
- replies table
- users_replies table.
- polls_votes table.
Add extra column to activity_stream table.
Fix an issue upgrading sites to MariaDB 10.3 from older versions of Gosora. Please report any other issues you find.

You need to run the updater / patcher for this commit.
2020-01-31 17:22:08 +10:00
Azareal 69a2430e5a Add option to delete all of a user's posts.
Add limited dynanicism to langf.
Eliminate a few queries when updating user stats.
Minor clean-up.

Namespace the profile language strings.
2020-01-14 15:07:00 +10:00
Azareal 0dede6a329 NoEmbeds privacy and config settings.
Phase out url_prefix and url_name.
Eliminate some boilerplate and allocations while we're at it.
Reduce the number of conditional statements in url validator loops.
Better parsing of Site.URL to handle user error better.

You will have to run the patcher / updater for this commit.
2019-12-08 13:40:56 +10:00
Azareal 1044518e74 Finish up the adminlogs.
Throw an error instead of updating a word filter that doesn't exist.
Track a bit of extra data for word filter updates.

Shorten the prefixes of the adminlog phrases from panel_logs_administration_ to panel_logs_admin_
Add a bunch of new adminlog phrases.
Tweak the word filter phrases.

Add the extra column to the moderation_logs and administration_logs tables.

You need to run the updater / patcher for this commit.
2019-11-10 12:37:53 +10:00
Azareal cc76d399e5 Simple spoilers. 2019-11-07 07:15:43 +10:00
Azareal 142359ce11 Add SslSchema config setting.
Reject URL usernames on registration.

Reduce length of char variable name.
2019-11-04 21:55:52 +10:00
Azareal 02cb64d3d9 Fix attachment parsing.
Shorten some things to reduce boilerplate.
Save some allocations.
2019-10-28 09:53:16 +10:00
Azareal 6147db18dd fix the url parser.
improve the url validator.
add a few more url parser test cases.
2019-10-13 17:32:05 +10:00
Azareal 38bbdfe0c2 Make parsed URLs look a little nicer. 2019-10-13 14:45:15 +10:00
Azareal 8d40139ae5 Tests are green now.
Recognise localhost equivalents in the parser.
Add rel=ugc to the bbcode parser too.
More shortening and boilerplate eliminating.
Fix a potential lock bug.
2019-10-06 11:49:31 +10:00
Azareal 11d1286b56 Save a few allocations in the parser.
Pave the way for rel=ugc support.
2019-10-06 10:55:03 +10:00
Azareal 22cb2701b2 Shorten a couple of attachment parameters.
Rename a mislabelled variable.
Prealloc in DefaultUserStore.BulkGetMap.
Prealloc in DefaultTopicStore.BulkGetMap.
Shorten the names of some temps.
Shorten a mssql querystring.
2019-07-25 17:00:49 +10:00
Azareal 13fa2326bd Avoid a few allocations for mentions.
Add six new parser test cases.
Stop treating lone double forward slashes as URLs.

Fixes #52
2019-07-11 20:44:18 +10:00
Azareal 1d13330a06 Move the emoji shortcode mappings into /config/emoji_default.json, custom emoji shortcodes can be defined in /config/emoji.json
Add the ldflags to the advanced installation steps.
2019-07-11 17:13:05 +10:00
Azareal a5441f18de More conversations progress, still not usable yet.
Flush the debug page incrementally.
Eliminate a tiny bit of code in PreparseMessage.
Shorten some of the pointer capture variables in the poll store.
Tweak the advanced installation instructions for EasyJSON to make it more repeatable.

Added the ConvoKey config setting.
Added /.git/ disk usage to the debug page, if it exists.
Added a UserStore.BulkGetMap multi-user test.
2019-06-16 16:30:58 +10:00
Azareal fdd223d9cf Rewrite the pagination algorithm so it works properly.
Shorten a few bits of JS.
Get the topic store methods to call BypassGet instead of duplicating logic.
2019-06-04 15:48:12 +10:00
Azareal bc20c495c3 Support IPv6 hosts in the URL Parser.
Support m and gaming variants of YouTube in the Media Parser.
Reduce repetition in the URL utility functions slightly.

Added 30 new parser test cases.
2019-05-24 09:39:24 +10:00
Azareal 515e607587 Mention, hashlink and URL Parser Rewrite Part 1.
Added 71 new test cases for the parser.
2019-05-22 14:45:07 +10:00
Azareal 4df0313961 Very basic non-image attachment embeds. 2019-04-16 21:45:55 +10:00
Azareal 5808f1d0ba Improved the poll UIs slightly.
Polls without any votes should look a little nicer now.
.hide_on_edit and other similar classes should now override other classes on Cosora.
Added <red> to avoid having to use inline styles for parser errors.
Reorganised a few elements in topic.html and topic_alt.html
Split topic_poll.html out of topic.html

Fixed a bug where attachments were getting assigned to the wrong reply / topic.

Added the router_after_filters hook.
Added the topic.poll_no_results phrase.

Added two parser tests.
2019-04-10 17:40:47 +10:00
Azareal e9f1a3c677 Added support for <h1>, <h2>, and <h3> to the core post parser.
Changed a span to a div in Tempra Simple and Shadow so that nested divs will work properly.

Added four parser tests.
2019-04-09 15:33:39 +10:00
Azareal 9d321e9f23 The router now redirects requests to localhost domains with localhost equivalents in the host header which don't quite match the destination to the proper domain.
The router now rejects host headers with the wrong port for non-standard ports.
The www. redirect now handles non-standard ports properly.
The Site.Port configuration setting is now validated on start-up to ensure it's a valid integer.

Quickly fixed up the grammar of the Port block in configuration.md
2019-04-01 15:44:38 +10:00
Azareal 4f7bb5320d You can now escape whitelisted HTML elements with a backslash to make them render as text rather than HTML elements.
Added eight more parser tests.
Replaced an empty slice with nil to make it cleaner.
2019-03-27 16:36:14 +10:00
Azareal 23a0bf3f41 Try hash based cache busting with stylesheets too.
Use a semantic blockquote element instead of span in plugin_bbcode for [quote]
You can now use <blockquote> elements directly in posts.
Added styling for quotes to Shadow, Cosora and Nox.
Experimenting with the padding on Nox's Control Panel Menu.
Tweaked the padding for the User Manager items on Nox.
Fixed #back filling up all the space it can on Tempra Simple.
Added a bit of padding below the last element before the footer on Tempra Simple.

Tempra Simple's misc.js is now loaded asynchronously.
Shadow's misc.js is now loaded asynchronously.
profile_member.js is now loaded asynchronously.
account.js is now loaded asynchronously.
2019-03-24 17:23:38 +10:00
Azareal f41a5dd943 Fix the issue with Grammarly spewing out random HTML. 2019-03-03 16:39:08 +10:00
Azareal 1fb497adf8 Deployed multi-series charts across the entirety of the analytics panel.
Added the one year time range to the analytics panes.
Dates are now shown on detail panes for Request, Topic and Post analytics instead of times for higher time ranges.
The labels should now show up properly for the three month time range charts.
The paginator should now work properly for login logs.
Pushed a potential fix for subsequent pages with only one item not showing. up.
Executing a search query should now change the title.
Fixed a bug where the user agent parser choked on : characters.
Fixed the ordering of items in the multi-series charts which caused the most important items to get booted out rather then the least important ones.
Tweaked the padding on the User Manager items for Nox so they won't break onto multiple lines so readily.
Fixed a potential issue with topic list titles.
Fixed a potential crash bug in the Forum Analytics for deleted forums.

Added the Count method to LoginLogStore.
Continued work on the ElasticSearch mapping setup utility.

Added the topic_list.search_head phrase.
Added the panel_statistics_time_range_one_year phrase.
2019-02-24 11:29:06 +10:00
Azareal d9acf27c5b The Search and Filter Widget is now partly implemented. Just Search to go in the basic implementation.
Added AJAX Pagination for the Topic List and Forum Page.
A new log file pair is now created every-time Gosora starts up.
Added proper per-theme template overrides.

Added EasyJSON to make JSON serialisation faster.
Moved a bit of boilerplate into paginator.html
Improved paginator.html with a richer template with first, last and symbols instead of text.
Phased out direct access to Templates.ExecuteTemplate across the software.
Fixed the Live Topic List so it should work again.
Added MicroAvatar to WsJSONUser for topic list JSON requests.
An instance of the plugin is now passed to plugin handlers rather than having the plugins manipulate the globals directly.
Added the pre_render_panel_forum_edit and pre_render_panel_forum_edit_perms hooks to replace pre_render_panel_edit_forum.
Renamed the pre_render_panel_edit_user hook to pre_render_panel_user_edit
Reduced the amount of noise from fsnotify.
Added RawPrepare() to qgen.Accumulator.
Added a temporary phrase whitelist to the phrase endpoint.
Moved the location of the zone data assignments in the topic list to reduce the chances of security issues in the future.
Changed the signature of routes/panel/renderTemplate() requiring some changes across the panel routes.
Removed bits of boilerplate in some of the panel routes with renderTemplate()
Added a BenchmarkTopicsGuestJSRouteParallelWithRouter benchmark.
Removed a fair bit of boilerplate for each page struct by generating a couple of interface casts for each template file instead.
Added the profile_comments_row_alt template.
Added the topics_quick_topic template to reuse part of the quick topic logic for both the topic list and forum page.
Tweaked the CSS for the Online Users Widget.
Tweaked the CSS for Widgets in every theme with a sidebar.
Refactored the template initialisers to hopefully reduce the amount of boilerplate and make things easier to maintain and follow.
Add genIntTmpl in the template initialiser file to reduce the amount of boilerplate needed for the fallback template bindings.

Removed the topics_head phrase.
Moved the paginator_ phrases into the paginator. namespace and renamed them accordingly.
Added the paginator.first_page phrase.
Added the paginator.first_page_aria phrase.
Added the paginator.last_page phrase.
Added the paginator.last_page_aria phrase.
Added the panel_forum_delete_are_you_sure phrase.

Fixed a data race in LogWarning()
2019-02-10 15:52:26 +10:00
Azareal f4337536dc Quick reply now takes you to your post rather than the first page of the topic.
Added the LastPage function.
2018-12-28 17:12:14 +10:00
Azareal bf2af0ae96 Laid the foundations for better reply attachments.
The attachment manager introduced in the previous patch is now properly localised.

Repurposed AttachmentStore.CountInTopic as a more general CountIn method.
Added an &amp; entity in attachment URLs so that the characters don't get mutated into something weird.
Tried to make the linebreaks a little glitchy in the inline editor, we have a better solution in a mind soon!
Fixed a bug where replies used .ContentHTML instead of .Content which led to a lot of HTML getting in the way of reply edits.
Fixed a bug where reply attachments used the topicID rather than the replyID for their originID entries.
Fixed a bug where the topic attachment counts weren't getting incremented.

Added the topic.select_button_test, topic.copy_button_test and topic.upload_button_test phrases.

Added the attachCount column to the replies table. This commit requires you to run the patcher / updater.
2018-12-27 19:12:30 +10:00
Azareal 876ae4e245 Refactored the plugin system to use a hook table. This should help to reduce the probability of data races and strange bugs, as-well as helping to abstract certain details, so future changes are less likely to break things.
Fixed the missing background for the create topic non-JS page in Nox.
The non-JS create topic page now has a localised title.
2018-10-21 23:54:32 +10:00
Azareal 15b3ad07fa Try to eliminate some of these debug comments. 2018-09-24 09:42:17 +10:00
Azareal eb6db07c30 Fixed a bug in the URL parser where it would demand a double newline rather than a single. 2018-09-20 16:47:54 +10:00
Azareal e9645c07bd Added support for simple named mentions.
Added a GetByName method to the UserStore.
Added eight mention tests.

Added the tryStepBackward function, might get removed.
Removed some superfluous commented debug statements.
2018-09-20 16:31:09 +10:00
Azareal 47d1010a53 Added the AddHashLinkType function so that plugins can add custom hash link types in an efficient manner.
Moved the hashLinkMap, etc. out of ParseMessage so that we can make them more pluggable.
The first word in usernames can no longer be purely numeric.
Added some ID mention tests.
2018-09-20 14:36:50 +10:00
Azareal f6b889b53b # is now allowed in URLs.
Added a few hashlink tests.
2018-09-20 12:58:06 +10:00
Azareal ca322a1456 Begin refactoring the hashlinks to make them more pluggable. 2018-09-20 12:44:34 +10:00
Azareal 46f03775c9 Use a Go 1.10 String Builder instead of byte slices in ParseMessage.
Removed a couple of unnecessary lines from global.js
2018-09-20 11:51:18 +10:00
Azareal 6941786490 Reduce the amount of boilerplate for images in the parser. 2018-09-19 16:59:07 +10:00
Azareal 335fe4fdbe Little useful note and began work on v0.2.0 2018-09-19 16:41:36 +10:00