Commit Graph

141 Commits

Author SHA1 Message Date
Azareal 7db4c60470 Simplify these calls with a closure. 2018-09-24 17:52:06 +10:00
Azareal 15b3ad07fa Try to eliminate some of these debug comments. 2018-09-24 09:42:17 +10:00
Azareal 00059194a5 Punctuation should demarcate word endings too. 2018-09-24 09:40:52 +10:00
Azareal a1403d495d Let's see how we can best do this o-o 2018-09-20 18:56:50 +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
Azareal 225a2cc8a1 0.1.0 tag, checkpoint release.
Upped the user cache capacity and topic cache capacity.
More resource management work. WIP.
Added Hyperdrive to the experimental folder. It doesn't really work right now, but I'd like to track it's progress.
Eliminated a line in global.js
2018-09-19 16:09:03 +10:00
Azareal cd89e836a1 Some resource management work and performance improvements.
Added the DeallocOverflow and BulkRemove methods to UserCache.
Added the HasUser method to WsHubImpl.
Added a hot path for the common case of a single uncached item in BulkGetMap in DefaultUserStore.
2018-09-13 17:41:01 +10:00
Azareal 1854010840 Fixed a bug where nil sockets weren't getting skipped.
Added some additional sanity checks.
2018-09-12 19:50:57 +10:00
Azareal 646c1f2545 Don't prematurely load topics just to increment their cached view counts. 2018-09-11 22:21:15 +10:00
Azareal 3822fe12d2 Refactored the client-side alert logic.
Exported WsHubImpl's PushMessage method.
Fixed a bug in WSUser's WriteAll and WriteToPage methods where they wouldn't skip over the nil sockets.
2018-09-08 22:47:37 +10:00
Azareal e22a96f53e Oops, make sure those locks are released. 2018-09-08 15:29:51 +10:00
Azareal dfc60ec214 Added support for multiple subscribers mapped to a single user in the WebSockets Component. Untested. 2018-09-08 15:12:48 +10:00
Azareal fd2a35cbcd Topic views should roughly update once every fifteen minutes in the UI now.
Fixed a bug where int64s wouldn't work properly in transpiled templates.
Changed the type of ViewCount in the topic structs to int64.
2018-09-08 11:32:24 +10:00
Azareal 39adc2e606 Per-topic views are now visible in the topic pages for the Nox Theme.
The parent forum of a topic is now visible on the topic pages for the Cosora and Nox Themes.
Added basic styling for polls to the Nox Theme.
Improved the styling for topic title editing in the Nox Theme.
2018-08-30 20:31:21 +10:00
Azareal 41c3a5bb4a Added a Content Security Policy for upgrading insecure images to HTTPS to avoid mixed content warnings. 2018-08-30 15:57:07 +10:00
Azareal f9dedc9691 Fixed a bug with users slipping past the topic list cache. 2018-08-27 19:06:00 +10:00
Azareal 8f7cda9378 Don't double-compress avatars.
Gzip is now disabled for static files when the gains don't justify the costs.
Moved StopServerChan and StoppedServer to package common.
Added some disabled profiling code.
2018-08-22 11:32:07 +10:00
Azareal 7b8943517b Upped the compression level for static files.
Experimenting with compressing everything.
Fixed the live things.

Playing around with topic buttons in Nox.
2018-08-21 18:00:35 +10:00
Azareal 9e8f455bbb Added resource utilisation data to the Debug Page. 2018-08-16 15:27:26 +10:00
Azareal d8682aca94 Move these header sets to the start of the router. 2018-08-15 18:06:48 +10:00
Azareal 3fc2d6a867 Added the init.js file to make certain bits of JS run sooner than others.
The template_*.js files should get cached now.
The phrase API results might get cached now.
Solved an edge case in the attachment parser where a redirect is triggered on a HTTPS site when the attachment is posted as a HTTP URL.
Fixed runHook in the JS files.
2018-08-13 20:34:00 +10:00
Azareal a9a1d667c0 Added the /api/me/ API endpoint.
Moved a script block into an API endpoint.
Split the gigantic switch in ServeHTTP into it's own function.
Scripts should load more efficiently now.
2018-08-12 01:53:42 +10:00
Azareal f2ecb9dbf7 apng is no longer a valid image format as we don't have the technology to optimise it.
Experimenting with systemd.

Began work on an experimental hook table implementation.
Tweaked some hook implementations to make their behaviour less ambiguous.
2018-08-07 14:14:28 +10:00
Azareal b8681524f3 Added a mitigation for polyglot attacks.
.panel_floater is now floated to the right on Nox.
2018-08-06 12:36:24 +10:00
Azareal 01a692ab5b Added the word filter store and moved the word filter routes into the route package.
Added tests for the word filter store.
Added qgen.NewAcc() to reduce the amount of boilerplate needed for creating an accumulator.
Exposed the RecordError method on the accumulator.
Added an Add method to PluginList and removed AddPlugin() in favour of that.

More panel buttons on Nox should be styled now.
Added the panel_update_button_text phrase for future use.

More errors might be caught in the thumbnailer now.
Removed ls from .travis.yml, it was there for debugging Code Climate.
2018-08-04 21:46:36 +10:00
Azareal 8e81f922ea Added some new test cases to catch more things and to see if the statistics on Code Climate change.
Added more TODO ideas for changes.
Removed an unused field from LanguagePack.
2018-07-31 14:02:09 +10:00
Azareal 7691078ce5 Fixed a bug in AddHook where the indices of the hooks would be off by one.
RemoveHook now panics under conditions which should normally never happen, but which when it does, gives off a far more useful message.
Changed the order of the conditional after BypassActive in PluginsDeactivate, so the error message will show up now.
The deactivation handler is optional again for plugins.

Added more tests for the plugin system.
2018-07-29 23:02:48 +10:00
Azareal 50d5be6f32 Moved the plugin manager to the routes package.
Added many, many tests for the plugin system.
Refactored some of the plugin system queries.

Fixed a bug where prepared statements would build up and crash Gosora.
Removed the inline CSS from the plugin rows.
2018-07-29 20:54:12 +10:00
Azareal d74a221467 Move the thumbnailer task closure into thumbnailer.go 2018-07-29 14:34:28 +10:00
Azareal 3aeee419c1 Added support for re-encoding GIFs, hopefully this'll work with animated avatars.
Fixed a bug where jpgs wouldn't get re-encoded.
2018-07-29 00:51:24 +10:00
Azareal 0a628f7201 PNG and JPG avatars are now encoded as JPG images leading to a dramatic drop in the amount of bandwidth used.
Did some work on image thumbnailing, but our dependencies are acting up delaying this from being released.

Fixed the positions of the topic list bits for Nox on mobile.
Removed APNG as an accepted image format, as we don't currently have a good way of optimising these images.
Added a comment regarding the constant time compare for sessions.
Added a warning about putting Gosora in www folders.
Noavatars can now take a width parameters.
Added a bit of missing validation for the avatar uploader.
Refactored the multiple file detector for the avatar uploader.

Added a Run method to accDeleteBuilder.
Added an EachInt method to AccSelectBuilder.
Added a Run method to accInsertBuilder.

Added the users_avatar_queue table, you will need to run the patcher / update script.
You might also want to update the Noavatar field in your config.json file with the new one.
2018-07-28 22:52:23 +10:00
Azareal 60bf821f8a Do constant time compares for sessions for security reasons. 2018-07-20 17:58:59 +10:00
Azareal 75a6ceca84 Added a missing bounds check in peekMatch. 2018-07-18 16:36:16 +10:00
Azareal e5ef86b59c Added user sharding to WsHubImpl to help reduce the amount of lock contention in the upcoming features which will rely heavily on it. 2018-07-18 16:32:48 +10:00
Azareal d0907134ef Database connection drops are handled better now. 2018-07-15 20:29:31 +10:00
Azareal 2a5ab2969c Added Caire and pkg/errors as dependencies.
Made the initialisers and the task runner in main.go easier to debug.

Added form_button_row to a few forms.
Bumped up the attachment image size for Cosora.
Hid the formlabels for the setting editor for Cosora to make it cleaner.
Revamped the account manager with the same CSS as in the Control Panel for Nox.
Started adding the_form to more forms.
Removed the account_emails CSS class from the email editor.
Continued tweaking the Control Panel in Nox to make it look nicer.
Tweaked some of the headers in the Nox Theme.
Added the Create Topic and Moderate options to the topic list on the Nox Theme, although the bulk moderation tools aren't available yet.
Tweaked the padding and sticky shades on the topics on the topic list on the Nox Theme.
Closed topics are now somewhat styled on the topic list on the Nox Theme.
Continued work on the topic pages for Nox.

Renamed Admin Approval to Staff Approval in the English Language Pack.
Added more phrases for the Group Manager and Panel Menu in spots I overlooked.

Began work on the dyntmpl template function.
Be sure to run the patcher / update script to get the new setting.
2018-07-13 21:27:58 +10:00
Azareal 0f2503a20c Made it harder to parse the antispam script.
Used Unicode magic to make it harder to parse the antispam trap question.
Added more shady email substrings.
Tweaked the contributing guidelines, no more await allowed... For now.
Might already have Git, note that.
Added the the_form class to the login form, registration form and login mfa form.
Made the titles on the Control Panel Dashboard and Debug page a little softer on Cosora.

Added the quick topic form to Nox.
Made the topic pages somewhat usable on Nox.
2018-07-05 19:54:01 +10:00
Azareal 3043ce083d Basic proxy IP support.
Switched out a couple of <a>s in the Control Panel with <h1>s, we might want to use <h2> here instead.
Added graphs for Nox.
Tweaked header markup for Nox.
Added support for live topic list to Nox.
Added styling for stickies on Nox.
Fixed topic list text overflow on Nox.
2018-07-03 20:01:49 +10:00
Azareal 2319548e1f Added some heuristics for detecting suspicious emails. 2018-06-30 20:22:39 +10:00
Azareal c640a73afd Fixed a crash bug in the post preparser.
Moved tryStepForward out of PreparseMessage()
Added another test for PreparseMessage()
2018-06-30 14:34:07 +10:00
Azareal bf40d61474 Live Topic List should work properly now with replies too, not just new topics.
Tweaked the visuals for the live topic list on Cosora. More to come with this.
Nox Theme is now present on the theme selector, although it's still under construction.

Improved SEO for social media.
Added the topic_list tmpl phrase prefix.
Added the topic_list.changed_topics phrase.
Added a few more PreparseMessage tests.
Session cookies should now be deleted after you logout, not just blanked.
2018-06-30 13:40:50 +10:00
Azareal 5d810c1e3b We now use SameSite cookies for sessions #security 2018-06-29 14:14:51 +10:00
Azareal 65ceaef4ea Tightened the preparser up a little and wrote more tests to cover more bases.
Green is a little misleading, as we Gosora doesn't call home to check for new versions yet.
2018-06-26 14:54:20 +10:00