Quantcast
Channel: Discourse Meta - Latest topics
Viewing all 60721 articles
Browse latest View live

Installation on AWS using RDS

$
0
0

Yavor Atanasov wrote:

Hey guys,

I've been looking at different topics here and your docs on github, but I can't seem to find any details on running Discourse on AWS using RDS. I can see you have a "recommended" and pretty straight forward way of running Discourse with Docker and there are community AMIs as well. I am not particularly worried about how the application itself will be running, whether in a container of some sort (docker) or directly on the host. I am more worried about resilience and scalability - I'd like to run the app on stateless EC2 instances within an Autoscaling group and persisting in RDS (as PostgreSQL is supported now). Persisting on locally running PostgreSQL is flakey as instances come and go (we have Chaos Monkey killing them at random as well) and it does not scale.

Do you have an updated view or recommendation on how to go about installing Discourse on AWS using RDS?

Obviously, if there is not an answer to this, I will contribute here as part of my installation journey to achieve the setup we require.

Posts: 1

Participants: 1

Read full topic


Following Discourse Install guide for Ubuntu.. Hit a snag

$
0
0

lunchtime wrote:

Got as far as:

When I try doing the 'git checkout latest-release' I get this error:

error: pathspec 'latest-release' did not match any file(s) known to git.

I'm a complete noob when it comes to any linux stuff, so I've just been following guides and using Google as a means of figuring things out as I go; I'm just not really understanding what to do to get around this problem. Thanks for any help!

Posts: 52

Participants: 11

Read full topic

About the translations category

Development mode super slow

$
0
0

Bill Dudney wrote:

I've gotten vagrant up and running with a development environment but it's taking forever to load.

For example http://192.168.10.200:3000/ takes tens of seconds to load.

I'm running the whole stack on a new rMBP with OS X 10.8.2.

Any ideas of what I've done wrong? Or is this just a function of being on the bleeding edge?

Thanks,

-bd

Posts: 53

Participants: 17

Read full topic

German Translation Sync between GH and Transifex

$
0
0

blang wrote:

Just want to let you guys know that i'm working on a sync between the gh and transifex version of the german translation files as announced in another topic.

In case of dups i prefer the transifex translation in comparison to gh.
I will publish the used script if someone needs them for other translations (handwork will be needed since i don't want to write a parser myself and using yaml parsers).

Greetz

Posts: 13

Participants: 3

Read full topic

Incoming topics by email to a particular category are not working

$
0
0

Paul Apostolos wrote:

Are there any logs that could provide details about why POP3 email topics to a particular category are not created?

The mailbox has messages in it and messages to different categories are working just fine.

I have double checked the spelling of the incoming email address (five times).

We are using Gmail as a POP3 provider.

Posts: 2

Participants: 2

Read full topic

Poll: How do you close a poll?

$
0
0

Burke wrote:

  • Duh. Use the button/link on the ______ screen that you overlooked.
  • Change the title from "Poll: Foobar" to "Closed Poll: Foobar"
  • Close the topic.
  • I dunno. Good question.

I love the simplicity of the poll feature (start title with "Poll: " and include a list), but it's not clear to me how to close the poll. I searched meta.discourse.org and looked at the poll plugin, but didn't see an answer. I was assuming that I could click on something or make an edit that would show the poll with results in read-only form. It would be nice to be able to close the poll for voting without having to close the topic, since valuable discussion on the topic might continue beyond the time allotted for voting. I know the plugin is early in development, so this feature might not exist yet... or maybe I just missed it.

Posts: 7

Participants: 5

Read full topic

System says "Error parsing email" when testing email-in

$
0
0

Erlend Sogge Heggen wrote:

Maybe this just applies to @michaeld and his DiscourseHosting.com, but might as well cover all my bases.

I'm trying to put the email-in feature to the test, but something isn't working right.

I've set up my gmail in accordance with this guide and I have successfully sent an email-reply from a test user that popped up as a reply on the forum. But I am unable to create new threads, Before I started successfully receiving new threads I received the following errors:

Error 1:

This is an automated message to inform you that parsing the following incoming email failed.
Please review the following message.
Error - unknown encoding name - utf8

Error 2:

This is an automated message to inform you that parsing the following incoming email failed.
Please review the following message.
Error - ActiveRecord::Rollback

What caused these?

Posts: 10

Participants: 6

Read full topic


I can't delete an empty category

Mac Safari not maintaining position in list

$
0
0

Sam Saffron wrote:

  1. Navigate down the topic list
  2. Click topic
  3. Click back

expected

I am in the same position in topic list

actual

I am in position 0 of the topic list

cc @eviltrout

(also visual looks pretty horrible with swipe back cause you get a double render)

Posts: 5

Participants: 4

Read full topic

Markup bypasses lower character limit

$
0
0

Mikulas Dite wrote:

Both title and body can be artificially extended by appending <div></div>. Character entropy is still enforced properly though, after the markup has been removed from title.

This might be seens as a power user feature and frankly I quite like it, but it seems like a bug nevertheless.

Proof of concept (following post):

Posts: 5

Participants: 3

Read full topic

Show an image but link to something else?

$
0
0

Jeff Atwood wrote:

I'm looking for a way to show an image, but link to something different like a video.

I can't seem to make this work with typical BB forum code, markdown or HTML.

Reason for this might be something that's not supported in one box, or maybe I just want to take more control over what is displayed and linked to... for instance just making the image much smaller or different.

EDIT: aww snap, I got it... nested markdown
[![](image_url)](target_url)

Posts: 3

Participants: 2

Read full topic

Accessing user profile from activity feed --> user profile photo updates but bio does not

$
0
0

Andrea Slobodien wrote:

Hi all. We're getting a weird bug on the 8tracks forums profile page, where it looks like parts of profiles are cached when navigating to a new profile from the activity feed.

  1. This is what my profile page should look like:

  2. In the activity feed below my profile information, I can click on other users' names to get to their profiles, so I click on SquaL. Note that my username and bio are still populating his profile info, but his photo and activity feed are correct, along with the URL at the top:

    1. From SquaL's feed, I click on armandomanzano and get the same caching issue:

    2. When I refresh the page using the URL above, the correct profile is loaded fully and properly:

Tagging our dev @paydrobui We can't figure out what would be causing this on our end so thought we'd post here and see if it's on your end. I was able to repro this on both Chrome and Safari, even after resetting Safari.

Thanks for the help!

Posts: 4

Participants: 3

Read full topic

Copy/Paste images in Chrome for Mac creating huge images

$
0
0

Alexandre Angelim wrote:

If I use the Chrome context menu over an image and choose "Copy Image"
to paste in discourse, I get huge images converted to png. As an example I'm pasting an image from discourse's blog. The original is a jpeg with 71Kb. The pasted image has 560Kb. I've seen much worse in my installation and I have all the dependencies for image_optim and image_sorcery installed. Is there a config to avoid converting to png or even disabling the copy/paste feature?

Posts: 10

Participants: 5

Read full topic

Transifex: Empty String


Notification subscription Options

$
0
0

Barry Chertov wrote:

I'd like to see it be possible to subscribe to a forum for email updates and be able to unsubscribe to a particular thread while staying subscribed to a forum for email updates (either via individual emails or digest).

Also I'd like to see a subscription option of just new threads that made it easy then to follow selected new threads.

Posts: 20

Participants: 7

Read full topic

How to help you guys?

$
0
0

Benjamin Kampmann wrote:

Continuing the discussion from Notification subscription Options:

No, that's fine. I got used to PRs taking some time (not only in discourse, but in general) and you have also other things to work on. And clearly, not everything should be merged without discussion. The way the discussion turned on the other hand bothered me. Especially since it is totally unclear what will and what won't get merged into core and what the process is to figure that out.

As this was a discussion at least @codinghorror had participated in and I had before hand mention I'd want to build it. So I assumed I had a blessing for the approach taken. Obviously I was wrong.

Sure, I'm not saying this wasted time is on you. And I do understand the process better now: unless some of you previously stated publicly you want it in and you want it done that way, any time spend on it might very likely be wasted – especially if that is user facing. Fair enough. So the process then is, pinging you guys (I assume over discourse ) and wait for a blessing before putting any time towards it. Slows down progress and isn't very motivating, but sure, fine with me. (btw, I did that here, waiting to hear back stuck_out_tongue .)

On a bigger scale, I (and many others) love to help and work on discourse, but from here, outside the core team, it is really hard to tell what to work on. Unless you take one of the specs you guys started creating and run with it, there is no way of knowing whether something is supposed to be a plugin, won't make it into core ever you or might actually be highly wanted for v1.0. Like the shared-edits, I wrote as a plugin and only learnt later, you'd love to have in the core (too/instead). Same goes the other way round for the email notification options.

Don't get me wrong, I do appreciate the specs and I think it is the right way to move forward, but it is also very slow as it requires a lot of time from you (from what I see, this lies with @sam only at the moment). But at least I am still missing the bigger picture. I'd highly appreciate a super rough list of features you were planning on having in v1, which ones you are working on and maybe also features you'd like to see but aren't working on. And then the community could (help) sketch those specs out together, it wouldn't be only on you and once you are happy with the spec (and gave your blessing), we can implement them without wasting our time. I think it worked quite well with Badges and we can do that with more.

Really, I'd love to help. It is just really hard to know on what to put the time at good use. So I don't even start anything bigger, though I'd love to do that.

That's why I am frustrated. Not because the PR took very long to just get rejected.

Posts: 1

Participants: 1

Read full topic

What category should plugin support be in?

$
0
0

Kane York wrote:

Continuing the discussion from Adsense plugin creates div and content, but nothing shows up:

This topic is in extensibility, but it's clearly a support request. Except it's a support request for a plugin, so it's a little bit different.

I see a few options for categorization:

  • extensibility
  • support
  • new subcategory of support, like wordpress
  • Off Topic (but then, what site should it be on?)

Keep in mind that the resolution of the topic should not affect your opinion, because that isn't known when you categorize it. (It isn't known whether the problem is with the Discourse configuration or the Google-side configuration.)

Posts: 7

Participants: 4

Read full topic

Official Single-Sign-On for Discourse

$
0
0

Sam Saffron wrote:

Discourse now ships with official hooks to perform auth offsite.

The Problem

Many sites wish to integrate with a Discourse site, however want to keep all user registration in a separate site. In such a setup all Login operations should be outsourced to a different site.

What if I would like SSO in conjunction with existing auth?

The intention around SSO is to replace Discourse authentication, if you would like to add a new provider see existing plugins such as: https://meta.discourse.org/t/vk-com-login-vkontakte/12987

Enabling SSO

To enable single sign on you have 3 settings you need to fill out:

enable_sso : must be enabled, global switch
sso_url: the offsite URL users will be sent to when attempting to log on
sso_secret: a secret string used to hash SSO payloads. Ensures payloads are authentic.

Once enable_sso is set to true:

  • Clicking on login or avatar will, redirect you to /session/sso which in turn will redirect users to sso_url with a signed payload.
  • Users will not be allowed to "change password". That field is removed from the user profile.
  • Users will no longer be able to use Discourse auth (username/password, google, etc)

What if you check it by mistake?

If you check enable_sso by mistake and need to revert to the original state and no longer have access to the admin panel

run:

RAILS_ENV=production bin/rails c
irb > SiteSetting.enable_sso = false

Implementing SSO on your site

Discourse will redirect clients to sso_url with a signed payload: (say sso_url is https://somesite.com/sso)

You will receive incoming traffic with the following

https://somesite.com/sso?sso=PAYLOAD&sig=SIG

The payload is a Base64 encoded string comprising of a nonce. The payload is always a valid querystring.

For example, if the nonce is ABCD. raw_payload will be:

nonce=ABCD, this raw payload is base 64 encoded.

The endpoint being called must

  1. Validate the signature, ensure that HMAC-SHA256 of sso_secret, PAYLOAD is equal to the sig
  2. Perform whatever authentication it has to
  3. Create a new payload with nonce, email, external_id and optionally (username, name, return_url)
  4. Base64 encode the payload
  5. Calculate a HMAC-SHA256 hash of the using sso_secret as the key and Base64 encoded payload as text
  6. Redirect back to http://discourse_site/session/sso_login?sso=payload&sig=sig

Discourse will validate that the nonce is valid (if valid it will expire it right away so it can no longer be used) it will attempt to:

  1. Log the user on by looking up an already associated external_id in the SingleSignOnRecord model
  2. Log the user on by using the email provided (updating external_id)
  3. Create a new account for the user providing (email, username, name) updating external_id

Security concerns

The nonce (one time token) will expire automatically after 10 minutes. This means that as soon as the user is redirected to your site they have 10 minutes to log in / create a new account.

The protocol is safe against replay attacks as nonce may only be used once.

Reference implementation

Discourse contains a reference implementation of the SSO class:

A trivial implementation would be:

class DiscourseSsoController < ApplicationController
  def sso
    secret = "MY_SECRET_STRING"
    sso = SingleSignOn.parse(request.query_string, secret)
    sso.email = "user@email.com"
    sso.name = "Bill Hicks"
    sso.username = "bill@hicks.com"
    sso.external_id = "123" # unique to your application
    sso.sso_secret = secret

    redirect_to sso.to_url("http://l.discourse/session/sso_login")
  end
end

Transitioning to and from single sign on.

The system always trusts emails provided by the single sign on endpoint. This means that if you had an existing account in the past on Discourse with SSO disabled, SSO will simply re-use it and avoid creating a new account.

If you ever turn off SSO, users will be able to reset passwords and gain access back to their accounts.

Real world example:

Given the following settings:

Discourse domain: http://discuss.example.com
SSO url : http://www.example.com/discourse/sso
SSO secret: d836444a9e4084d5b224a60c208dce14

User attempt to login

  • Nonce is generated: cb68251eefb5211e58c00ff1395f0c0b

  • Raw payload is generated: nonce=cb68251eefb5211e58c00ff1395f0c0b

  • Payload is Base64 encoded: bm9uY2U9Y2I2ODI1MWVlZmI1MjExZTU4YzAwZmYxMzk1ZjBjMGI=\n

  • Payload is URL encoded: bm9uY2U9Y2I2ODI1MWVlZmI1MjExZTU4YzAwZmYxMzk1ZjBjMGI%3D%0A

  • HMAC-256 is generated on the encoded payload: 2828aa29899722b35a2f191d34ef9b3ce695e0e6eeec47deb46d588d70c7cb56

Finally browser is redirected to:

http://www.example.com/discourse/sso?sso=bm9uY2U9Y2I2ODI1MWVlZmI1MjExZTU4YzAwZmYxMzk1ZjBjMGI%3D%0A&sig=2828aa29899722b35a2f191d34ef9b3ce695e0e6eeec47deb46d588d70c7cb56

On the other end

  1. Payload is validated using HMAC-SHA256, if the sig mismatches, process aborts.
  2. By reversing the steps above nonce is extracted.

User logs in:

name: sam
external_id: hello123
email: test@test.com
username: samsam
  • Unsigned payload is generated:

nonce=cb68251eefb5211e58c00ff1395f0c0b&name=sam&username=samsam&email=test%40test.com&external_id=hello123

order does not matter, values are URL encoded

  • Payload is Base64 encoded

"bm9uY2U9Y2I2ODI1MWVlZmI1MjExZTU4YzAwZmYxMzk1ZjBjMGImbmFtZT1z\nYW0mdXNlcm5hbWU9c2Ftc2FtJmVtYWlsPXRlc3QlNDB0ZXN0LmNvbSZleHRl\ncm5hbF9pZD1oZWxsbzEyMw==\n

  • Payload is URL encoded

bm9uY2U9Y2I2ODI1MWVlZmI1MjExZTU4YzAwZmYxMzk1ZjBjMGImbmFtZT1z%0AYW0mdXNlcm5hbWU9c2Ftc2FtJmVtYWlsPXRlc3QlNDB0ZXN0LmNvbSZleHRl%0Acm5hbF9pZD1oZWxsbzEyMw%3D%3D%0A

  • Payload is signed

1c884222282f3feacd76802a9dd94e8bc8deba5d619b292bed75d63eb3152c0b

  • Browser redirects to:

http://discuss.example.com/session/sso_login?sso=bm9uY2U9Y2I2ODI1MWVlZmI1MjExZTU4YzAwZmYxMzk1ZjBjMGImbmFtZT1z%0AYW0mdXNlcm5hbWU9c2Ftc2FtJmVtYWlsPXRlc3QlNDB0ZXN0LmNvbSZleHRl%0Acm5hbF9pZD1oZWxsbzEyMw%3D%3D%0A&sig=1c884222282f3feacd76802a9dd94e8bc8deba5d619b292bed75d63eb3152c0b

Future work

  • We would like to gather more reference implementations for SSO on other platforms. If you have one please post to the Extensibility / SSO category.

  • Add session expiry and/or revalidation logic, so users are not logged in forever.

  • Create an API endpoint to log off users, in case somebody logs off the main site.

  • Consider adding a discourse_sso gem to make it easier to implement in Ruby.

Updates:

2-Feb-2014

  • use HMAC-SHA256 instead of SHA256. This is more secure and cleanly separates key from payload.
  • removed return_url, the system will automatically redirect users back to the page they were on after login

4-April-2014

  • Added example

Posts: 21

Participants: 6

Read full topic

Where to config production database?

$
0
0

Mingming Wang wrote:

Hi Guys,

As a Rails 3.X beginner, I'm trying to setup Discourse in an Ubuntu VPS for production.

In the database.yml page, it said

You may be surprised production is not here, it is sourced from application.rb using a monkey patch
This is done for 2 reasons
1. we need to support blank settings correctly and rendering nothing in yaml/erb is a PITA
2. why go from object -> yaml -> object, pointless

How to config production database then? I checked application.rb but not sure which part to config.

Please help me out. Many thanks!

Mingming

Posts: 7

Participants: 3

Read full topic

Viewing all 60721 articles
Browse latest View live




Latest Images