Domande sul trasferimento di un forum esistente a Discourse

Ciao a tutti :slight_smile:

Mi scuso in anticipo per questo post lungo, ma forse qualcuno che conosce bene Discourse saprà rispondere subito.

Co-gestisco un forum di nicchia moderato. In due: l’altro ha scritto il software (anch’esso in Ruby). Il forum esistente è completamente personalizzato, noto per la sua semplicità rispetto, ad esempio, a PHP-BB e Vbulletin (che continuano a subire attacchi). Il database è di circa 40 GB e contiene 200.000 post. Per varie ragioni stiamo valutando la migrazione del database su un’altra piattaforma e Discourse sembra una soluzione valida.

I test preliminari suggeriscono che sia piuttosto valido nelle funzionalità generali, ad esempio il supporto per l’incorporamento di immagini e video. Funziona correttamente persino il caricamento di più immagini da un telefono Android!

Tuttavia, avremmo bisogno di alcune personalizzazioni, principalmente semplificazioni dell’interfaccia utente. Ecco alcuni esempi, senza un ordine particolare di importanza:

  1. Non mostrare il totale dei post di un utente: questo serve a evitare che i nuovi membri si sentano intimiditi.

  2. Bloccare la modifica dei post da parte dell’utente dopo un certo periodo (attualmente impostato a 2 ore): questo serve a prevenire un tipo di trolling non raro in questo ambito.

  3. Una sezione per annunci classificati con possibilità di pagamento tramite PayPal. Mi rendo conto che non è banale a causa della configurazione della struttura dei prezzi, del link di pagamento, ecc.

  4. Visualizzare in modo evidente l’anno nella data del post.

  5. Possibilità per gli amministratori di accedere a un utente e vedere chi altro è attivo sulla stessa installazione del browser (basato essenzialmente sui cookie). So che Discourse ha già questa funzione, ma basata sull’indirizzo IP, che al giorno d’oggi non è efficace (molti utenti usano dati mobili, specialmente quelli che vogliono gestire più identità). Ho letto questo thread
    Handling trolls with multiple accounts over VPNs - #18 by ljpp
    e altri, quindi è chiaro che molti hanno già affrontato questo problema; non esistono soluzioni per chi è esperto di VPN, ecc. Questi utenti tendono a farsi scoprire col tempo dallo stile di scrittura o pubblicando qualcosa di davvero offensivo, venendo poi bannati. Suggerirei anche che rilevare lo stesso hash della password sarebbe utile, dato che molte persone usano la stessa password per tutti i loro account :wink:

  6. Per gli amministratori, un elenco lineare semplice dei post, che permetta una revisione rapida degli ultimi x post da un telefono. Immagino che si possa realizzare con un po’ di codice che accede direttamente al database, su un sottodominio. All’interno di questo elenco, ci dovrebbero essere i pulsanti ELIMINA e BAN, in modo che chi pubblica qualcosa di offensivo (sfortunatamente non raro nei forum) possa essere rimosso rapidamente.

  7. Forse è già presente, da quanto ho capito: la possibilità per gli amministratori di unire post selezionati (o tutti) da un thread a un altro, mantenendo i post nel thread di destinazione in ordine cronologico corretto. Mi rendo conto che questo potrebbe rompere i link ai post, a meno che il link non sia unico per il sito (ad esempio, se si riferisce al numero del post nel database, e non al numero del post all’interno del thread).

  8. Generazione da parte degli amministratori di un elenco CSV di indirizzi email di tutti gli utenti che hanno effettuato l’accesso negli ultimi 12 o 24 mesi. Abbiamo notato che inviare email a utenti più vecchi (più inattivi) aumenta notevolmente il rischio di finire nelle liste nere (RBL, ecc.), nonostante l’invio (principalmente su incontri, qualche volta all’anno) venga effettuato lentamente, un’email al minuto, per minimizzare il rischio (nell’invio blacklistiamo anche tutti gli indirizzi noti temporanei, come sharklasers.com).

  9. Un’impostazione nel profilo utente per scegliere se ricevere queste email, per conformità al GDPR.

Ho appena letto il thread qui sul GDPR. Per quanto ne so nel Regno Unito, un autore non ha il diritto di richiedere la cancellazione dei propri post. Può far rimuovere le sue credenziali di accesso. Mi chiedo se Discourse sia in qualche modo più vulnerabile in questo ambito. Nel nostro forum, quasi tutti usano già uno pseudonimo.

  1. Possibilità per gli amministratori di leggere i messaggi privati (PM). È essenziale perché molti spammer si registrano e inviano solo PM senza pubblicare. Non lo sapremmo a meno che qualcuno non si lamenti, ma molte nuove registrazioni sono sospette (anche se non chiaramente tali), quindi le monitoriamo per un po’… Ad esempio, abbiamo un’impostazione “Paese” nel profilo utente che deve essere specificata durante la registrazione; qualcuno che imposta la Germania ma è con un IP tailandese è probabilmente sospetto, ma potrebbe anche essere un tedesco in Thailandia!

  2. Un’impostazione “Paese” per la posizione dell’utente, obbligatoria durante la registrazione (mi rendo conto che possono inserire ciò che vogliono).

Mi rendo conto che se si apportano modifiche al codice, applicare gli aggiornamenti potrebbe essere difficile o impossibile…

Le registrazioni sospette sono un vero problema. Stimo che attualmente il 10-20% delle registrazioni sia sospetto; quindi, se non si fa nulla, si avranno molti problemi in futuro. Il comportamento abituale è registrarsi, aspettare una settimana, poi inondare il forum di spam.

Purtroppo non conosco Ruby. Ho fatto un po’ di PHP. La mia esperienza IT è più generale: server POP e SMTP, macchine virtuali, VPN, FTP, SPF, DKIM, configurazioni dei router. HTML semplice ma niente CSS… La mia vecchia esperienza IT riguarda hardware e software per sistemi embedded (assembler e C). Chi ha scritto il software originale si è offerto di aiutare con la migrazione del database. Ho alcuni contatti che possono occuparsi di altre parti, ma non ho attualmente competenze dirette in Ruby… Ho alcuni siti in esecuzione su un server Linode che ha funzionato in modo molto affidabile, quindi sarebbe la mia prima scelta per l’hosting.

Grazie in anticipo per aver letto fino a qui e per eventuali indicazioni su quanto di tutto questo sia già presente e quanto lavoro sarebbe necessario per completare il resto, o qualcosa di simile :slight_smile:

Hi Peter!

there are people much more knowledgable than me, but I can try to answer at least some of them. :slight_smile:

  1. This seems like a trivial CSS fix, I am sure someone will help you here.
  2. I believe there is a site setting for this so it should be trivial.
  3. I guess you’ll need a separate post for this with more specific info and examples. You can try to search for plugins here, there are some that might do the job. but hard to say for sure.

Ad 6. Generally, Discourse relies on users flagging nasty post to help with moderation. You can set it up in a way that only one flag from a trusted user will hide the post. For your specific ask you might need a plugin.

Ad 7. This is not possible at this point I believe. Search around on meta, there are discussions about this.
Ad 8. Yep, you can easily export user data and then filter out based on “last seen” column

Ad. 10: Yep, out of the box. Admins can access everything.
Ad. 11: Yep, doable in site customization, the keyword is custom user fields, and you can enforce them at sign up.

1 Mi Piace

Hey Peter :smiley:.

Already some good answers from Daniel, let me see if I can assist with the rest and/or provide more details.

  1. Definitely trival CSS. Just need to know where you are seeing this number (it may appear in more than one location) and we can help you hide it.
  2. Yep, this is a site setting. post edit time limit. Default is 60 days, 2 hours seems really short - I’d expect it to lead to lots of “oh by the way” or “edit” replies to one’s own post.
  3. Definitely need more details, but this sounds like plugin territory.
  4. You can customize the post timestamp to display year (instead of relative time since post), could also likely add the year separately via a theme-component or plugin.
  5. Check out GitHub - discourse/discourse-fingerprint: A plugin that computes user fingerprints to help administrators combat internet trolls. - not sure the status of the plugin though, @dan can likely share more.
  6. You can see all posts sorted by recency via RSS, but there is obviously no delete or suspend buttons there. We’ve found that context is key, and showing posts outside their topic can lead to mistakes. A seemingly innocuous post by itself may in fact be quite bad in context. A seemingly trolling post by itself may be a nice friendly joke in context.
    That said, you can build this via the API if you need to.
  7. You can merge posts from one topic to another, but it does not support reordering the topic - all merged posts are added to the end of the topic. Merging won’t completely break links - they won’t point directly to the post’s new location, but there’s a “x posts moved to …” post added to the topic where the posts were moved from, which can be clicked to jump to the new topic.
  8. Check out Discourse Data Explorer as well.
  9. Users have full control over emails they receive. By default (assuming no modified site settings), they’re emailed when mentioned, PM’d, directly replied to, or quoted. They’re also emailed when someone replies to a topic they started, and one email every 7 days when they haven’t logged into the site, up to a maximum of 52 “weekly digest” emails. Users can modify these preferences at any time, and all emails have an unsubscribe link. If you’re planning to email users from an external tool (say mailgun), you can add a custom user field (checkbox type) which users can use to indicate if they wish to receive emails.
  10. Yep.
  11. Yep.

Talking about dodgy signups - we don’t see too many dodgy signups as being a JavaScript application prevents most old-fashioned scrapers from being able to see the signup fields, let alone verify email.

5 Mi Piace

Thank you Daniel.

I have been doing some testing with a sample site (running on a laptop :slight_smile: )

Regarding point 7) I see that post moving is supported but I see the original link does break. So the “share” link is not a unique link to the post. It just takes you into where the post was in the thread before the move.

We had this issue on the existing forum too (where I do a lot of thread merging, to keep the site informative). It was initially addressed by entirely removing the link to the post after the move… This proved to be a hassle in the long run; the only way you could get a link to such a post was by doing a search for some fairly unique string within it and then you could extract a link to it from the search results. Eventually it was solved using the cunning method of using the database post ID (a large number on a forum with 200k posts) as the link, and that works great while looking slightly odd. However if a forum used the database ID # from the start, it would work great.

Many thanks too Joshua. A real pity about the merging issue; that is a big thing on the original site.

Re point 6) I currently see the Section / Thread Name / post text, so the whole context is there. I know what you mean; you can’t tell what the post is a reply to because that post could be 50 posts down. But usually an offensive post is obviously offensive in a standalone manner. Especially if you see the poster’s name… I find that within the past 30 days about 200 people have posted and the rude ones run around the 2% mark. It is a bizzare observation that you could discharge the mod job by marking the other 98% invisible and just getting an RSS feed with the 2% :slight_smile: :slight_smile:

BTW I find that all the dodgy signups are clearly humans. They even fill in their profile intelligently in some cases, then come back a week later and drop the spam in :slight_smile: There is an army of them in India, Africa and similar places and they know how to do it. The majority are selling fake passports but we had one recently who was much more clever. He took a post from earlier in the thread and pasted it in (so producing a sensible looking post, which was actually a question). He then changed the question mark into a live link, which most people would not spot. But Chrome will prefetch all the links on a page… a nice attack vector! At that point we changed it so every signup is manually approved. Not a major workload on a forum of this size.

Discourse post links use the following form by default:

{scheme}://{hostname}/t/{topic-slug}/{topic-id}/{post-number-within-topic}

The topic-id is the most important, using an invalid topic-slug, or even skipping it will still work.

For example, for your post above, any of these would work:

https://meta.discourse.org/t/questions-about-moving-an-existing-forum-to-discourse/104948/4
https://meta.discourse.org/t/fake-slug-here/104948/4
https://meta.discourse.org/t/104948/4

You can link directly to a post, by using the following format (you will need to manually create such links, or use a plugin to help create them for you in the Share UI):

{scheme}://{hostname}/p/{post-id}

Again, for your post above:

https://meta.discourse.org/p/514248

You can obtain the post-id by looking at the json data for a given post: https://meta.discourse.org/t/questions-about-moving-an-existing-forum-to-discourse/104948/4.json


I disagree with you that the category, topic title, and post text are enough context in all cases. Some examples:

  • Topic started talking about “Favorite Pizza toppings”. Over time, the discussion has shifted to favorite restaurants somehow. If solely considering category, title, and post, a reply about a hamburger joint would seem spammy, or at least off topic. But by reviewing a few preceding replies you can see that the topic has simply digressed, not a specific user.
  • Topic started talking about “how to fix a flat tire”. Two users are going back and forth discussing how to do so. User B replies with the solution. User A realized he missed something obvious, and makes a self-deprecating remark. Without seeing the preceding replies, one may be quick to delete the post as inappropriate, even when it would be fine (and possibly even humorous if done nicely) within the topic.

Interesting to hear about the human spammers. Good news in the specific example you shared about profiles: we compile a list of all user who sign up, modify their profile, and don’t post. You can view the list of “suspect users” from your admin dashboard - and quickly delete them, optionally blocking the email and IP from further sign ups if you want.

Saw your edit: manual approval of new accounts is a simple setting change.

2 Mi Piace

Joshua - indeed, I have been testing the post links. Only the x/y number is required. It is the same on ours. The issue is that moving the post to a different thread breaks that link.

The drawback with blocking people who create a profile but never post is that lots of genuine people do that (on our forum at least) because having a login gives you various privileges e.g. seeing new posts. I am aware one can achieve that with just cookies but I am told that presenting user-specific context without a login is regarded as bad practice these days (well, Amazon does it, to a certain level, so it must be good). We have ~3.5k signed up of which 1.5k have posted.

That fingerprint feature would be hugely controversial if it was discovered, which it will be very quickly if implemented with client-side keystroke timing i.e. javascript. And if you do the timing server-side (I apologise for lack of clarity / wrong terminology) then you break various browser features like spell checking, because each keystroke goes straight to the server separately.

Regarding the spam, you might find some interesting ideas in a relatively recent discussion here:

1 Mi Piace

Yes; that tactic works because most forums don’t check posts except when originally posted. Edits are not checked :slight_smile:

Another tactic is to put something in your profile or your avatar. Those don’t get checked either, but they get picked up by google.

It’s all about getting SEO.

Lots of answers to your questions here. I think that the human spam is also mitigated by Akismet.

I have written several custom importers. You can see my notes about them here. It’s how I make my living, so it is largely about paying me to do the job, but also gives you some idea of what the issues are should you write the importer yourself.

1 Mi Piace

We have decided to leave the migration for the time being. The requirement for post moving is quite important.

If this feature is sorted out one day, we would be happy to re-visit the project.

So I thank you all for your answers :slight_smile:

You definitely want to run the Akismet plugin, however, as there are a large number of 100% human spammers running around out there today. Big increase in human spam numbers over the last 10 years.

Slightly off topic; should Discourse admins have access to member PMs (P emphasized for obvious reasons)?

The answer to whether or not Admins should have access to Personal Messages was answered in the OP (# 10) - spammers

Admins on every forum need full access, for many reasons. Legal (e.g. member harassment by another member), spam management (e.g. many spammers join up and just send out lots of PMs without ever posting), subversion (disgruntled posters sometimes embark on a background mailing campaign to trash the site, spread allegations about the admins, etc), covert advertising (a real person joins up and sends out loads of PMs to promote his forum related business)… Any forum gets some mixture of this stuff… unfortunately, in addition to spammers, there are several % of people who cause trouble. In reality I am sure most forum admins never look at this stuff routinely (I certainly don’t) because they have better things to do, but you want there to be triggers e.g. more than 10 PMs sent within a day, within an hour, whatever.

Ultimately absolutely everything you do on some website is visible to whoever has admin access to the server.

The only Q is what access moderators have, and on most small sites they are the same person(s). This then leads to the topic of renegade mods (of which I have seen many examples, having been on forums since the internet got going, Compu$erve onwards :slight_smile: ) and this is a real problem. If you have a large site and have to appoint a load of mods, this policy needs to be done carefully because a renegade mod can do tremendous damage.

I have another Q on Discourse: is there a feature or a plug-in which can implement a question/answer session at signup time? For example if running a space flight related forum, you may want to put in some multiple choice question about the order of the planets’ distances from the sun, to keep the less intelligent spammers from signing up.

1 Mi Piace

This plugin is ready for production and it did in fact run on a well-known Discourse for some time, but it was not a “toxic” community that would return lots of results. From what I can remember, there was a problem with Apple devices, as there is not much diversity when it comes to those and Safari does not leak very much info either. So, please take the results with a grain of salt.

If you decide to use it, please let me know. I would be very interested in seeing how it works in a real-world situation.

That is something I definitely do not recommend. It would decrease the overall security strength of the authentication system.

4 Mi Piace

Presumably because you would need to have an indexed database of the hashes, which is yet another thing that can be hacked?

How come Safari doesn’t leak enough info? I know nothing about this topic but AIUI the only way to do keyboard fingerprinting is to time the keystrokes somehow, with millisecond resolution. But didn’t browsers do something very recently on the timing front, to block the Kaiser / Meltdown exploit which of necessity relies on accurate timing?

As regards other means of user fingerprinting, there is a ton of methods. There was one website (which now escapes me) which you went to and it produced a breakdown of all it can see about you, e.g. browser type, screen pixel size, java version, about 20 other things. It then calculated how unique the ID is (based on e.g. how many Chrome v41.5.6 users were running a specifies combination of plugins etc etc). And it very quickly got to c. 99.99%. So even if someone clears their cookies on every visit, they are still about 99.99% identifiable… well for a while until their browser gets an update etc. But the server then has to keep all that stuff in the logfiles and index it all up; I am sure most forums don’t bother.

And all someone needs to do to defeat all that is to use a different client device on a mobile IP. I have just had someone create their 4th character this way (he didn’t last long because he started posting his usual trolls). Or if they want to do it all from their home PC, they just need to run a throwaway browser instance in a VM and going out via a VPN terminating in the Peoples’ Republic of Cameroon (yes this is a real example too :slight_smile: ). I’ve seen one chap (who created about 10 identities) use the TOR browser, but his alter egos were a dead giveaway because who would be browsing a special interest (technology related) using such a heavy duty method intended for illegal activities, and whose IP really does map to various African countries?

We had one guy who ran two characters, one polite and one who posted rude stuff, including one post which IMHO would have resulted in a police visit (to us), but in hindsight he would have been detectable simply on cookies. I think cookies are a powerful enough method, and throw in the IP for good measure.

Regarding the user’s post count, it was something I recall seeing when testing the sample installation. If it is not shown, I apologise!

Would a CSS change really suppress it? I ask that because I recall one forum I used to visit years ago (another technology one) which had a “print thread” feature (actually printing threads is where most forums, along with most other websites, fail miserably, but I suppose not many people print nowadays… although one may want to print to a PDF) and when you used that feature, every user’s email address would appear for about 100ms :slight_smile: Someone malicious could have written a spider which grabbed the stuff, for whatever dodgy purpose.

Had Discourse had proper functionality for moving posts from one thread to another, with links to posts retained (which AFAICS requires the link to be the unique post ID # from the database, or some long hash of something) we would have probably bitten the bullet and gone ahead with the move.

There are only about ten kinds of iPhone, and they are all identical. Thus, no useful device fingerprinting.

As for timing, the browsers clamp you to about 2ms. That’s still plenty of accuracy for user behavior fingerprinting; you need microsecond-accurate timing to do Spectre.

Let’s not be fallacious here. There are two types of sockpuppets you know about; the ones that do the tech solid, but flub the character, and the ones who do the character solid, but flub the tech. You don’t know about the ones that do both correctly. They’re not “trolls”, per se, since the whole point of trolling is to post flame bait, so you will eventually identify the tree by its fruit. But astroturfing, things like fake product reviews and subtler SEO spam, those are the worse part.

No, obviously CSS won’t prevent the post count from showing up in the API and the DOM. But there’s really no point in trying to hide the post count; unlike the email address, which you actually might have a prayer of keeping secret, the post count can by definition be mined by Mallory just scraping your entire forum and counting the posts herself.

4 Mi Piace

Reminder that this is not possible on Discourse, as new users cannot PM until they have reached trust level 1.

We have global rate limits on topic creation and PMs, there is also a limit on how long PMs can get. But you are right, there should be good visibility into anomalous PM patterns by TL1 users.

4 Mi Piace

You don’t know about the ones that do both correctly.

That’s true, but do you care? Anyone who can pull off both is quite clever and by definition making a good contribution to the forum :slight_smile:

Most forums would be happy to have Vlad the Impaler posting, provided he was polite and on-topic, etc :slight_smile:

1 Mi Piace

Side note, highlight text, click quote.

4 Mi Piace